This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] gen-classpath-compare


Hi list,


I wrote a little patch to make gen-classpath-compare display expected diffs. 
This helps to see what differences has to be merged in the future and what 
should not be merged for several reasons. This is hopefully documented in the 
diff.


Michael
Index: bin/gen-classpath-compare
===================================================================
RCS file: /cvs/gcc/wwwdocs/bin/gen-classpath-compare,v
retrieving revision 1.6
diff -u -b -B -r1.6 gen-classpath-compare
--- bin/gen-classpath-compare	25 Apr 2003 11:39:11 -0000	1.6
+++ bin/gen-classpath-compare	9 Jan 2004 22:07:58 -0000
@@ -20,6 +20,8 @@
    OUTPUT="`echo $0 | sed -e 's,/[^/]*/[^/]*$,,'`"
 fi
 
+EXPECTEDDIR="$OUTPUT/expected"
+
 if test -z "$LIBGCJ" || test -z "$CLASSPATH" || test -z "$OUTPUT"; then
    echo "usage: gen-classpath-compare [-cvs] libgcj-path classpath-path [output-path]" 1>&2
    exit 1
@@ -105,7 +107,16 @@
 	 diff -u "$cpfile" $f > $tmp
 	 if test -s $tmp; then
 	    cp $tmp "$OUTPUT/compare/$class.diff"
+            if test -f $EXPECTEDDIR/$class.diff ; then
+              diff -q $OUTPUT/compare/$class.diff $EXPECTEDDIR/$class.diff > /dev/null
+	      if test "$?" = "1" ; then
+	        Merge="<td bgcolor=\"#aaaaee\"><a href=\"compare/$class.diff\">Diff</a></td>"
+              else
+		Merge="<td bgcolor=\"#aaaaee\"><a href=\"compare/$class.diff\">Expected diff</a></td>"
+	      fi
+	    else
 	    Merge="<td bgcolor=\"#aaaaee\"><a href=\"compare/$class.diff\">Diff</a></td>"
+	    fi
 	 fi
 	 rm -f $tmp
       fi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]