krysalis-update/src/java/org/krysalis/depot/update/impl/util DiffTool.java,1.1,1.2

Nick Chalko <[email protected]> Wed, 08 Dec 2004 09:11:54 +0000
Newsgroups gmane.comp.krysalis.cvs
Message-ID <[email protected]>
Update of /cvsroot/krysalis/krysalis-update/src/java/org/krysalis/depot/update/impl/util
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26470/src/java/org/krysalis/depot/update/impl/util

Modified Files:
	DiffTool.java 
Log Message:
format

Index: DiffTool.java
===================================================================
RCS file: /cvsroot/krysalis/krysalis-update/src/java/org/krysalis/depot/update/impl/util/DiffTool.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DiffTool.java	8 Dec 2004 09:06:31 -0000	1.1
--- DiffTool.java	8 Dec 2004 09:11:52 -0000	1.2
***************
*** 17,20 ****
--- 17,21 ----
  package org.krysalis.depot.update.impl.util;
  
+ import org.krysalis.depot.common.util.note.AnnotationScratchpad;
  import org.krysalis.depot.update.Artifact;
  import org.krysalis.depot.update.ArtifactInstance;
***************
*** 22,26 ****
  import org.krysalis.depot.update.artifact.ArtifactLocator;
  import org.krysalis.depot.update.artifact.ArtifactType;
- import org.krysalis.depot.common.util.note.AnnotationScratchpad;
  import org.krysalis.version.Version;
  
--- 23,26 ----
***************
*** 38,44 ****
  	 * @see AnnotationScratchpad
  	 */
! 	public static AnnotationScratchpad diff(
! 		ArtifactInstance ai1,
! 		ArtifactInstance ai2) {
  		AnnotationScratchpad pad = new AnnotationScratchpad();
  
--- 38,43 ----
  	 * @see AnnotationScratchpad
  	 */
! 	public static AnnotationScratchpad diff(ArtifactInstance ai1,
! 			ArtifactInstance ai2) {
  		AnnotationScratchpad pad = new AnnotationScratchpad();
  
***************
*** 50,62 ****
  	/**
  	 * Difference two ArtifactInstance
! 	 * @param pad where to write into
  	 * @param ai1
  	 * @param ai2
  	 * @see AnnotationScratchpad
  	 */
! 	public static void diff(
! 		AnnotationScratchpad pad,
! 		ArtifactInstance ai1,
! 		ArtifactInstance ai2) {
  
  		pad.info("Artifact Instance #1: " + ai1);
--- 49,61 ----
  	/**
  	 * Difference two ArtifactInstance
! 	 * 
! 	 * @param pad
! 	 *            where to write into
  	 * @param ai1
  	 * @param ai2
  	 * @see AnnotationScratchpad
  	 */
! 	public static void diff(AnnotationScratchpad pad, ArtifactInstance ai1,
! 			ArtifactInstance ai2) {
  
  		pad.info("Artifact Instance #1: " + ai1);
***************
*** 74,79 ****
  		if (ae) {
  			pad.debug(" * Artifacts Reported as Equal *");
! 		}
! 		else {
  			pad.info(" * Artifacts Reported as NOT Equal *");
  		}
--- 73,77 ----
  		if (ae) {
  			pad.debug(" * Artifacts Reported as Equal *");
! 		} else {
  			pad.info(" * Artifacts Reported as NOT Equal *");
  		}
***************
*** 85,93 ****
  		ArtifactLocator l1 = ai1.getLocator();
  		ArtifactLocator l2 = ai2.getLocator();
! 		
  		if (l1.equals(l2)) {
  			pad.debug(" * ArtifactLocators Reported as Equal *");
! 		}
! 		else {
  			pad.info(" * ArtifactLocators Reported as NOT Equal *");
  		}
--- 83,90 ----
  		ArtifactLocator l1 = ai1.getLocator();
  		ArtifactLocator l2 = ai2.getLocator();
! 
  		if (l1.equals(l2)) {
  			pad.debug(" * ArtifactLocators Reported as Equal *");
! 		} else {
  			pad.info(" * ArtifactLocators Reported as NOT Equal *");
  		}
***************
*** 96,100 ****
  
  	}
! 	
  	/**
  	 * Perform a difference on two Artifact
--- 93,97 ----
  
  	}
! 
  	/**
  	 * Perform a difference on two Artifact
***************
*** 105,111 ****
  	 * @see AnnotationScratchpad
  	 */
! 	public static AnnotationScratchpad diff(
! 		Artifact a1,
! 		Artifact a2) {
  		AnnotationScratchpad pad = new AnnotationScratchpad();
  
--- 102,106 ----
  	 * @see AnnotationScratchpad
  	 */
! 	public static AnnotationScratchpad diff(Artifact a1, Artifact a2) {
  		AnnotationScratchpad pad = new AnnotationScratchpad();
  
***************
*** 117,129 ****
  	/**
  	 * Difference two Artifact
! 	 * @param pad where to write into
  	 * @param a1
  	 * @param a2
  	 * @see AnnotationScratchpad
  	 */
! 	public static void diff(
! 		AnnotationScratchpad pad,
! 		Artifact a1,
! 		Artifact a2) {
  
  		pad.info("Artifact  #1: " + a1);
--- 112,123 ----
  	/**
  	 * Difference two Artifact
! 	 * 
! 	 * @param pad
! 	 *            where to write into
  	 * @param a1
  	 * @param a2
  	 * @see AnnotationScratchpad
  	 */
! 	public static void diff(AnnotationScratchpad pad, Artifact a1, Artifact a2) {
  
  		pad.info("Artifact  #1: " + a1);
***************
*** 140,157 ****
  		if (g1.equals(g2)) {
  			pad.debug(" * ArtifactGroups Reported as Equal *");
! 		}
! 		else {
  			pad.info(" * ArtifactGroups Reported as NOT Equal *");
  		}
  		pad.info("ArtifactGroup #1: " + a1);
  		pad.info("ArtifactGroup #2: " + a2);
! 		
  		ArtifactType t1 = a1.getType();
  		ArtifactType t2 = a2.getType();
! 		
  		if (t1.equals(t2)) {
  			pad.debug(" * ArtifactTypes Reported as Equal *");
! 		}
! 		else {
  			pad.info(" * ArtifactTypes Reported as NOT Equal *");
  		}
--- 134,149 ----
  		if (g1.equals(g2)) {
  			pad.debug(" * ArtifactGroups Reported as Equal *");
! 		} else {
  			pad.info(" * ArtifactGroups Reported as NOT Equal *");
  		}
  		pad.info("ArtifactGroup #1: " + a1);
  		pad.info("ArtifactGroup #2: " + a2);
! 
  		ArtifactType t1 = a1.getType();
  		ArtifactType t2 = a2.getType();
! 
  		if (t1.equals(t2)) {
  			pad.debug(" * ArtifactTypes Reported as Equal *");
! 		} else {
  			pad.info(" * ArtifactTypes Reported as NOT Equal *");
  		}
***************
*** 161,169 ****
  		Version v1 = a1.getVersion();
  		Version v2 = a2.getVersion();
! 		
  		if (v1.equals(v2)) {
  			pad.debug(" * Versions Reported as Equal *");
! 		}
! 		else {
  			pad.info(" * Versions Reported as NOT Equal *");
  		}
--- 153,160 ----
  		Version v1 = a1.getVersion();
  		Version v2 = a2.getVersion();
! 
  		if (v1.equals(v2)) {
  			pad.debug(" * Versions Reported as Equal *");
! 		} else {
  			pad.info(" * Versions Reported as NOT Equal *");
  		}



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/