]> thyrsus.com Git - src.git/commitdiff
Attempt to fix revspec-parsing bug introduced by commit -a change.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 22 Dec 2014 16:31:13 +0000 (11:31 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 22 Dec 2014 16:31:13 +0000 (11:31 -0500)
All regression tests pass.

src

diff --git a/src b/src
index af5751448dfde4c81837cdc3cdcd4a67b99f6148..63dd9041e0ef86ce9fc1bd9eb5122c6009a89c73 100755 (executable)
--- a/src
+++ b/src
@@ -1075,12 +1075,15 @@ def commit_method(*args):
             croak(" %s creation failed, check directory permissions." % repodir)
     args = list(args)
     addonly = False
+    parse_revspec = True
     while args:
         if args[0] == '--':
             args.pop(0)
+            parse_revspec = False
             break
         elif args[0] == '-a':
             addonly = True
+            parse_revspec = False
             args.pop(0)
         else:
             break
@@ -1088,7 +1091,7 @@ def commit_method(*args):
         comment = CommentContext("commit", args)
     ctx = CommandContext("commit", args,
                          require_empty=True,
-                         parse_revspec=not addonly and comment.parse_revspec)
+                         parse_revspec=parse_revspec and comment.parse_revspec)
     for arg in ctx.args:
         if not os.path.exists(arg):
             croak("I see no '%s' here." % arg)