[Bug 5314] New: Command line options: option with argument not recognized in some cases

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Fri Jul 29 07:38:23 UTC 2016


https://bz.mercurial-scm.org/show_bug.cgi?id=5314

            Bug ID: 5314
           Summary: Command line options: option with argument not
                    recognized in some cases
           Product: Mercurial
           Version: 3.5.2
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at selenic.com
          Reporter: peter.juhasz at uhusystems.com
                CC: mercurial-devel at selenic.com

I've used the following command:

    hg ci -m "-Revert"

Expected behavior: a new commit would be created with the message "-Revert"

Observed behavior: error message

hg commit: option -m requires argument
hg commit [OPTION]... [FILE]...
/* rest of standard usage message omitted */


I assume this happens because there is a -R option and hg thinks that the "-R"
in "-Revert" is an invocation of that option. "--repository" and "--cwd" also
triggers this behavior, though none of the other global (or commit-specific)
options do.

My commit messages usually follow a pattern of "-Keyword: description", and
sometimes I use Revert as the keyword, and it is frustrating that it randomly
doesn't work.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list