Make srcdiff more verbose when reporting differences
authorNathan Scott <nathans@sgi.com>
Tue, 5 Aug 2003 04:11:59 +0000 (04:11 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 5 Aug 2003 04:11:59 +0000 (04:11 +0000)
tools/srcdiff

index 1e4b569..9dd8095 100755 (executable)
@@ -65,11 +65,13 @@ sub straightdiff {
        `diff $prefix1/$file $prefix2/$file >/dev/null 2>&1`;
        if (!$quiet) {
                print sprintf("\t%-35s ... ", $file);
-               if ($? != 0)    { print "FAILED\n"; }
+               if ($? != 0)    { printf("FAILED\n(%s/%s differs to %s/%s)\n",
+                                        $prefix1, $file, $prefix2, $file); }
                else            { print "ok\n"; }
-       } elsif ($? != 0) { 
-               printf("\t%-35s ... ", $file);
-               print "FAILED\n"; 
+       
+       } elsif ($? != 0) {
+               printf("\t%-35s ... FAILED\n(%s/%s differs to %s/%s)\n",
+                       $file, $prefix1, $file, $prefix2, $file);
        }
 }