]> thyrsus.com Git - src.git/commitdiff
Fine-grained diff doesn't quite work.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 7 Nov 2014 02:15:54 +0000 (21:15 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 7 Nov 2014 02:15:54 +0000 (21:15 -0500)
src

diff --git a/src b/src
index 15e338db4be814db20438002682c388eb4b29eab..4227db3f076ff7b7c6555696b8ccc91ccdb70ac9 100755 (executable)
--- a/src
+++ b/src
@@ -346,11 +346,15 @@ def diff_method(*args):
     while args and args[0].startswith("-"):
         diffopts += " " + args.pop(0)
     for arg in args:
-        revlist = RCSLog(arg)
         do_or_die("mv .src/{0},v .".format(arg))
-        if revspec is None:
-            # The || : suppresses the error return from diff(1)
-            do_or_die("rcsdiff -q {0} {1} || :".format(diffopts, arg), loud=True)
+        diffspec = ""
+        if revspec is not None:
+            state = RCSLog(arg)
+            diffspec += "-r" + state.revno_to_rcs(revspec[0])
+            if len(revspec) > 1:
+                diffspec += " -r" + state.revno_to_rcs(revspec[1])
+        # The || : suppresses the error return from diff(1)
+        do_or_die("rcsdiff -q {0} {1} {2} || :".format(diffspec, diffopts, arg),loud=True)
         do_or_die("mv {0},v .src".format(arg))
 
 dispatch = {