From: Eric S. Raymond Date: Mon, 22 Dec 2014 16:31:13 +0000 (-0500) Subject: Attempt to fix revspec-parsing bug introduced by commit -a change. X-Git-Tag: 0.18~1 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=f421234fe70f868e2a2ff3e4b8c4b2fc27c0d673;p=src.git Attempt to fix revspec-parsing bug introduced by commit -a change. All regression tests pass. --- diff --git a/src b/src index af57514..63dd904 100755 --- 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)