diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1087,53 +1087,53 @@ def verify(ui, repo): # Command options and aliases are listed here, alphabetically table = { - "^add": (add, [], "hg add [files]"), - "addremove": (addremove, [], "hg addremove [files]"), + "^add": (add, [], "hg add FILE..."), + "addremove": (addremove, [], "hg addremove [FILE]..."), "^annotate": (annotate, [('r', 'revision', '', 'revision'), ('u', 'user', None, 'show user'), ('n', 'number', None, 'show revision number'), ('c', 'changeset', None, 'show changeset')], - 'hg annotate [-u] [-c] [-n] [-r id] [files]'), + 'hg annotate [-r REV] [-u] [-n] [-c] FILE...'), "cat": (cat, [('o', 'output', "", 'output to file')], - 'hg cat [-o outfile] [rev]'), + 'hg cat [-o OUTFILE] FILE [REV]'), "^clone": (clone, [('U', 'noupdate', None, 'skip update after cloning')], - 'hg clone [options] [dest]'), + 'hg clone [-U] SOURCE [DEST]'), "^commit|ci": (commit, - [('t', 'text', "", 'commit text'), - ('A', 'addremove', None, 'run add/remove during commit'), + [('A', 'addremove', None, 'run add/remove during commit'), + ('t', 'text', "", 'commit text'), ('l', 'logfile', "", 'commit text file'), ('d', 'date', "", 'date code'), ('u', 'user', "", 'user')], - 'hg commit [files]'), - "copy": (copy, [], 'hg copy '), + 'hg commit [OPTION]... [FILE]...'), + "copy": (copy, [], 'hg copy SOURCE DEST'), "debugcheckstate": (debugcheckstate, [], 'debugcheckstate'), "debugstate": (debugstate, [], 'debugstate'), - "debugindex": (debugindex, [], 'debugindex '), - "debugindexdot": (debugindexdot, [], 'debugindexdot '), + "debugindex": (debugindex, [], 'debugindex FILE'), + "debugindexdot": (debugindexdot, [], 'debugindexdot FILE'), "^diff": (diff, [('r', 'rev', [], 'revision')], - 'hg diff [-r A] [-r B] [files]'), + 'hg diff [-r REV1 [-r REV2]] [FILE]...'), "^export": (export, [('o', 'output', "", 'output to file')], - "hg export [-o file] ..."), - "forget": (forget, [], "hg forget [files]"), + "hg export [-o OUTFILE] REV..."), + "forget": (forget, [], "hg forget [FILE]..."), "heads": (heads, [], 'hg heads'), - "help": (help_, [], 'hg help [command]'), + "help": (help_, [], 'hg help [COMMAND]'), "identify|id": (identify, [], 'hg identify'), "import|patch": (import_, [('p', 'strip', 1, 'path strip'), ('b', 'base', "", 'base path')], - "hg import [options] "), + "hg import [-p NUM] [-b BASE] PATCH..."), "^init": (init, [], 'hg init'), "locate": (locate, @@ -1142,19 +1142,19 @@ table = { ('i', 'include', [], 'include path in search'), ('r', 'rev', '', 'revision'), ('x', 'exclude', [], 'exclude path from search')], - 'hg locate [options] [files]'), + 'hg locate [OPTION]... [PATTERN]...'), "^log|history": (log, [('r', 'rev', [], 'revision'), ('p', 'patch', None, 'show patch')], - 'hg log [-r A] [-r B] [-p] [file]'), - "manifest": (manifest, [], 'hg manifest [rev]'), - "parents": (parents, [], 'hg parents [node]'), + 'hg log [-r REV1 [-r REV2]] [-p] [FILE]'), + "manifest": (manifest, [], 'hg manifest [REV]'), + "parents": (parents, [], 'hg parents [REV]'), "^pull": (pull, [('u', 'update', None, 'update working directory')], - 'hg pull [options] [source]'), - "^push": (push, [], 'hg push '), + 'hg pull [-u] [SOURCE]'), + "^push": (push, [], 'hg push [DEST]'), "rawcommit": (rawcommit, [('p', 'parent', [], 'parent'), @@ -1163,14 +1163,14 @@ table = { ('F', 'files', "", 'file list'), ('t', 'text', "", 'commit text'), ('l', 'logfile', "", 'commit text file')], - 'hg rawcommit [options] [files]'), + 'hg rawcommit [OPTION]... [FILE]...'), "recover": (recover, [], "hg recover"), - "^remove|rm": (remove, [], "hg remove [files]"), + "^remove|rm": (remove, [], "hg remove FILE..."), "^revert": (revert, [("n", "nonrecursive", None, "don't recurse into subdirs"), ("r", "rev", "", "revision")], - "hg revert [files|dirs]"), + "hg revert [-n] [-r REV] NAME..."), "root": (root, [], "hg root"), "^serve": (serve, @@ -1181,7 +1181,7 @@ table = { ('n', 'name', os.getcwd(), 'repository name'), ('', 'stdio', None, 'for remote clients'), ('t', 'templates', "", 'template map')], - "hg serve [options]"), + "hg serve [OPTION]..."), "^status": (status, [], 'hg status'), "tag": (tag, @@ -1189,7 +1189,7 @@ table = { ('t', 'text', "", 'commit text'), ('d', 'date', "", 'date code'), ('u', 'user', "", 'user')], - 'hg tag [options] [rev]'), + 'hg tag [OPTION]... NAME [REV]'), "tags": (tags, [], 'hg tags'), "tip": (tip, [], 'hg tip'), "undo": (undo, [], 'hg undo'), @@ -1197,7 +1197,7 @@ table = { (update, [('m', 'merge', None, 'allow merging of conflicts'), ('C', 'clean', None, 'overwrite locally modified files')], - 'hg update [options] [node]'), + 'hg update [-m] [-C] [REV]'), "verify": (verify, [], 'hg verify'), "version": (show_version, [], 'hg version'), } diff --git a/tests/test-help.out b/tests/test-help.out --- a/tests/test-help.out +++ b/tests/test-help.out @@ -33,14 +33,14 @@ basic hg commands (use "hg help -v" for status show changed files in the working directory update update or merge working directory hg add: option -h not recognized -hg add [files] +hg add FILE... add the specified files on the next commit hg add: option --skjdfks not recognized -hg add [files] +hg add FILE... add the specified files on the next commit -hg diff [-r A] [-r B] [files] +hg diff [-r REV1 [-r REV2]] [FILE]... -r --rev revision