# HG changeset patch # User FUJIWARA Katsunori # Date 2010-06-06 08:25:00 # Node ID 40c06bbf58be56b6d7c19f0dc2f37c8e639ce9ac # Parent e4274f9f97c8d851df1de0e18ee6394b5f791db4 help: show value requirement and multiple occurrence of options this helps users to know what kind of option is: - no value is required(flag option) - value is required - value is required, and multiple occurrences are allowed each kinds are shown as below: -f --force force push -e --ssh CMD specify ssh command to use -b --branch BRANCH [+] a specific branch you would like to push if one or more 3rd type options are shown, explanation for '[+]' mark is also shown as footnote. diff --git a/doc/gendoc.py b/doc/gendoc.py --- a/doc/gendoc.py +++ b/doc/gendoc.py @@ -25,7 +25,11 @@ def get_desc(docstr): return (shortdesc, desc) def get_opts(opts): - for shortopt, longopt, default, desc in opts: + for opt in opts: + if len(opt) == 5: + shortopt, longopt, default, desc, optlabel = opt + else: + shortopt, longopt, default, desc = opt allopts = [] if shortopt: allopts.append("-%s" % shortopt) diff --git a/hgext/bookmarks.py b/hgext/bookmarks.py --- a/hgext/bookmarks.py +++ b/hgext/bookmarks.py @@ -334,9 +334,9 @@ cmdtable = { "bookmarks": (bookmark, [('f', 'force', False, _('force')), - ('r', 'rev', '', _('revision')), + ('r', 'rev', '', _('revision'), _('REV')), ('d', 'delete', False, _('delete a given bookmark')), - ('m', 'rename', '', _('rename a given bookmark'))], + ('m', 'rename', '', _('rename a given bookmark'), _('NAME'))], _('hg bookmarks [-f] [-d] [-m NAME] [-r REV] [NAME]')), } diff --git a/hgext/children.py b/hgext/children.py --- a/hgext/children.py +++ b/hgext/children.py @@ -38,7 +38,8 @@ def children(ui, repo, file_=None, **opt cmdtable = { "children": (children, - [('r', 'rev', '', _('show children of the specified revision')), + [('r', 'rev', '', + _('show children of the specified revision'), _('REV')), ] + templateopts, _('hg children [-r REV] [FILE]')), } diff --git a/hgext/churn.py b/hgext/churn.py --- a/hgext/churn.py +++ b/hgext/churn.py @@ -172,16 +172,19 @@ def churn(ui, repo, *pats, **opts): cmdtable = { "churn": (churn, - [('r', 'rev', [], _('count rate for the specified revision or range')), - ('d', 'date', '', _('count rate for revisions matching date spec')), + [('r', 'rev', [], + _('count rate for the specified revision or range'), _('REV')), + ('d', 'date', '', + _('count rate for revisions matching date spec'), _('DATE')), ('t', 'template', '{author|email}', - _('template to group changesets')), + _('template to group changesets'), _('TEMPLATE')), ('f', 'dateformat', '', - _('strftime-compatible format for grouping by date')), + _('strftime-compatible format for grouping by date'), _('FORMAT')), ('c', 'changesets', False, _('count rate by number of changesets')), ('s', 'sort', False, _('sort by key (default: sort by count)')), ('', 'diffstat', False, _('display added/removed lines separately')), - ('', 'aliases', '', _('file with email aliases')), + ('', 'aliases', '', + _('file with email aliases'), _('FILE')), ] + commands.walkopts, _("hg churn [-d DATE] [-r REV] [--aliases FILE] [FILE]")), } diff --git a/hgext/color.py b/hgext/color.py --- a/hgext/color.py +++ b/hgext/color.py @@ -218,7 +218,8 @@ def uisetup(ui): extensions.wrapfunction(dispatch, '_runcommand', colorcmd) commands.globalopts.append(('', 'color', 'auto', - _("when to colorize (always, auto, or never)"))) + _("when to colorize (always, auto, or never)"), + _('TYPE'))) try: import re, pywintypes diff --git a/hgext/convert/__init__.py b/hgext/convert/__init__.py --- a/hgext/convert/__init__.py +++ b/hgext/convert/__init__.py @@ -258,13 +258,20 @@ commands.norepo += " convert debugsvnlog cmdtable = { "convert": (convert, - [('A', 'authors', '', _('username mapping filename')), - ('d', 'dest-type', '', _('destination repository type')), - ('', 'filemap', '', _('remap file names using contents of file')), - ('r', 'rev', '', _('import up to target revision REV')), - ('s', 'source-type', '', _('source repository type')), - ('', 'splicemap', '', _('splice synthesized history into place')), - ('', 'branchmap', '', _('change branch names while converting')), + [('A', 'authors', '', + _('username mapping filename'), _('FILE')), + ('d', 'dest-type', '', + _('destination repository type'), _('TYPE')), + ('', 'filemap', '', + _('remap file names using contents of file'), _('FILE')), + ('r', 'rev', '', + _('import up to target revision REV'), _('REV')), + ('s', 'source-type', '', + _('source repository type'), _('TYPE')), + ('', 'splicemap', '', + _('splice synthesized history into place'), _('FILE')), + ('', 'branchmap', '', + _('change branch names while converting'), _('FILE')), ('', 'branchsort', None, _('try to sort changesets by branches')), ('', 'datesort', None, _('try to sort changesets by date')), ('', 'sourcesort', None, _('preserve source changesets order'))], diff --git a/hgext/extdiff.py b/hgext/extdiff.py --- a/hgext/extdiff.py +++ b/hgext/extdiff.py @@ -259,10 +259,14 @@ def extdiff(ui, repo, *pats, **opts): cmdtable = { "extdiff": (extdiff, - [('p', 'program', '', _('comparison program to run')), - ('o', 'option', [], _('pass option to comparison program')), - ('r', 'rev', [], _('revision')), - ('c', 'change', '', _('change made by revision')), + [('p', 'program', '', + _('comparison program to run'), _('CMD')), + ('o', 'option', [], + _('pass option to comparison program'), _('OPT')), + ('r', 'rev', [], + _('revision'), _('REV')), + ('c', 'change', '', + _('change made by revision'), _('REV')), ] + commands.walkopts, _('hg extdiff [OPT]... [FILE]...')), } diff --git a/hgext/fetch.py b/hgext/fetch.py --- a/hgext/fetch.py +++ b/hgext/fetch.py @@ -138,7 +138,8 @@ def fetch(ui, repo, source='default', ** cmdtable = { 'fetch': (fetch, - [('r', 'rev', [], _('a specific revision you would like to pull')), + [('r', 'rev', [], + _('a specific revision you would like to pull'), _('REV')), ('e', 'edit', None, _('edit commit message')), ('', 'force-editor', None, _('edit commit message (DEPRECATED)')), ('', 'switch-parent', None, _('switch parents when merging')), diff --git a/hgext/gpg.py b/hgext/gpg.py --- a/hgext/gpg.py +++ b/hgext/gpg.py @@ -276,8 +276,10 @@ cmdtable = { [('l', 'local', None, _('make the signature local')), ('f', 'force', None, _('sign even if the sigfile is modified')), ('', 'no-commit', None, _('do not commit the sigfile after signing')), - ('k', 'key', '', _('the key id to sign with')), - ('m', 'message', '', _('commit message')), + ('k', 'key', '', + _('the key id to sign with'), _('ID')), + ('m', 'message', '', + _('commit message'), _('TEXT')), ] + commands.commitopts2, _('hg sign [OPTION]... [REVISION]...')), "sigcheck": (check, [], _('hg sigcheck REVISION')), diff --git a/hgext/graphlog.py b/hgext/graphlog.py --- a/hgext/graphlog.py +++ b/hgext/graphlog.py @@ -370,9 +370,11 @@ def _wrapcmd(ui, cmd, table, wrapfn): cmdtable = { "glog": (graphlog, - [('l', 'limit', '', _('limit number of changes displayed')), + [('l', 'limit', '', + _('limit number of changes displayed'), _('NUM')), ('p', 'patch', False, _('show patch')), - ('r', 'rev', [], _('show the specified revision or range')), + ('r', 'rev', [], + _('show the specified revision or range'), _('REV')), ] + templateopts, _('hg glog [OPTION]... [FILE]')), } diff --git a/hgext/hgk.py b/hgext/hgk.py --- a/hgext/hgk.py +++ b/hgext/hgk.py @@ -314,7 +314,8 @@ def view(ui, repo, *etc, **opts): cmdtable = { "^view": (view, - [('l', 'limit', '', _('limit number of changes displayed'))], + [('l', 'limit', '', + _('limit number of changes displayed'), _('NUM'))], _('hg view [-l LIMIT] [REVRANGE]')), "debug-diff-tree": (difftree, diff --git a/hgext/inotify/__init__.py b/hgext/inotify/__init__.py --- a/hgext/inotify/__init__.py +++ b/hgext/inotify/__init__.py @@ -79,8 +79,11 @@ cmdtable = { '^inserve': (serve, [('d', 'daemon', None, _('run server in background')), - ('', 'daemon-pipefds', '', _('used internally by daemon mode')), - ('t', 'idle-timeout', '', _('minutes to sit idle before exiting')), - ('', 'pid-file', '', _('name of file to write process ID to'))], + ('', 'daemon-pipefds', '', + _('used internally by daemon mode'), _('NUM')), + ('t', 'idle-timeout', '', + _('minutes to sit idle before exiting'), _('NUM')), + ('', 'pid-file', '', + _('name of file to write process ID to'), _('FILE'))], _('hg inserve [OPTION]...')), } diff --git a/hgext/keyword.py b/hgext/keyword.py --- a/hgext/keyword.py +++ b/hgext/keyword.py @@ -559,7 +559,8 @@ cmdtable = { 'kwdemo': (demo, [('d', 'default', None, _('show default keyword template maps')), - ('f', 'rcfile', '', _('read maps from rcfile'))], + ('f', 'rcfile', '', + _('read maps from rcfile'), _('FILE'))], _('hg kwdemo [-d] [-f RCFILE] [TEMPLATEMAP]...')), 'kwexpand': (expand, commands.walkopts, _('hg kwexpand [OPTION]... [FILE]...')), diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -2835,7 +2835,8 @@ cmdtable = { ('U', 'noupdate', None, _('do not update the new working directories')), ('', 'uncompressed', None, _('use uncompressed transfer (fast over LAN)')), - ('p', 'patches', '', _('location of source patch repository')), + ('p', 'patches', '', + _('location of source patch repository'), _('REPO')), ] + commands.remoteopts, _('hg qclone [OPTION]... SOURCE [DEST]')), "qcommit|qci": @@ -2849,7 +2850,8 @@ cmdtable = { "qdelete|qremove|qrm": (delete, [('k', 'keep', None, _('keep patch file')), - ('r', 'rev', [], _('stop managing a revision (DEPRECATED)'))], + ('r', 'rev', [], + _('stop managing a revision (DEPRECATED)'), _('REV'))], _('hg qdelete [-k] [-r REV]... [PATCH]...')), 'qfold': (fold, @@ -2870,9 +2872,11 @@ cmdtable = { "qimport": (qimport, [('e', 'existing', None, _('import file in patch directory')), - ('n', 'name', '', _('name of patch file')), + ('n', 'name', '', + _('name of patch file'), _('NAME')), ('f', 'force', None, _('overwrite existing files')), - ('r', 'rev', [], _('place existing revisions under mq control')), + ('r', 'rev', [], + _('place existing revisions under mq control'), _('REV')), ('g', 'git', None, _('use git extended diff format')), ('P', 'push', None, _('qpush after importing'))], _('hg qimport [-e] [-n NAME] [-f] [-g] [-P] [-r REV]... FILE...')), @@ -2886,9 +2890,11 @@ cmdtable = { ('f', 'force', None, _('import uncommitted changes (DEPRECATED)')), ('g', 'git', None, _('use git extended diff format')), ('U', 'currentuser', None, _('add "From: " to patch')), - ('u', 'user', '', _('add "From: " to patch')), + ('u', 'user', '', + _('add "From: " to patch'), _('USER')), ('D', 'currentdate', None, _('add "Date: " to patch')), - ('d', 'date', '', _('add "Date: " to patch')) + ('d', 'date', '', + _('add "Date: " to patch'), _('DATE')) ] + commands.walkopts + commands.commitopts, _('hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...')), "qnext": (next, [] + seriesopts, _('hg qnext [-s]')), @@ -2896,7 +2902,8 @@ cmdtable = { "^qpop": (pop, [('a', 'all', None, _('pop all patches')), - ('n', 'name', '', _('queue name to pop (DEPRECATED)')), + ('n', 'name', '', + _('queue name to pop (DEPRECATED)'), _('NAME')), ('f', 'force', None, _('forget any local changes to patched files'))], _('hg qpop [-a] [-n NAME] [-f] [PATCH | INDEX]')), "^qpush": @@ -2905,7 +2912,8 @@ cmdtable = { ('l', 'list', None, _('list patch name in commit text')), ('a', 'all', None, _('apply all patches')), ('m', 'merge', None, _('merge from another queue (DEPRECATED)')), - ('n', 'name', '', _('merge queue name (DEPRECATED)')), + ('n', 'name', '', + _('merge queue name (DEPRECATED)'), _('NAME')), ('', 'move', None, _('reorder patch series and apply only the patch'))], _('hg qpush [-f] [-l] [-a] [-m] [-n NAME] [--move] [PATCH | INDEX]')), "^qrefresh": @@ -2917,11 +2925,11 @@ cmdtable = { ('U', 'currentuser', None, _('add/update author field in patch with current user')), ('u', 'user', '', - _('add/update author field in patch with given user')), + _('add/update author field in patch with given user'), _('USER')), ('D', 'currentdate', None, _('add/update date field in patch with current date')), ('d', 'date', '', - _('add/update date field in patch with given date')) + _('add/update date field in patch with given date'), _('DATE')) ] + commands.walkopts + commands.commitopts, _('hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...')), 'qrename|qmv': @@ -2934,7 +2942,8 @@ cmdtable = { "qsave": (save, [('c', 'copy', None, _('copy patch directory')), - ('n', 'name', '', _('copy directory name')), + ('n', 'name', '', + _('copy directory name'), _('NAME')), ('e', 'empty', None, _('clear queue status file')), ('f', 'force', None, _('force copy'))] + commands.commitopts, _('hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f]')), diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py --- a/hgext/patchbomb.py +++ b/hgext/patchbomb.py @@ -518,14 +518,16 @@ cmdtable = { ('b', 'bundle', None, _('send changes not in target as a binary bundle')), ('', 'bundlename', 'bundle', - _('name of the bundle attachment file')), - ('r', 'rev', [], _('a revision to send')), + _('name of the bundle attachment file'), _('NAME')), + ('r', 'rev', [], + _('a revision to send'), _('REV')), ('', 'force', None, _('run even when remote repository is unrelated ' '(with -b/--bundle)')), ('', 'base', [], _('a base changeset to specify instead of a destination ' - '(with -b/--bundle)')), + '(with -b/--bundle)'), + _('REV')), ('', 'intro', None, _('send an introduction email for a single patch')), ] + emailopts + commands.remoteopts, diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -538,10 +538,14 @@ cmdtable = { "rebase": (rebase, [ - ('s', 'source', '', _('rebase from the specified changeset')), - ('b', 'base', '', _('rebase from the base of the specified changeset ' - '(up to greatest common ancestor of base and dest)')), - ('d', 'dest', '', _('rebase onto the specified changeset')), + ('s', 'source', '', + _('rebase from the specified changeset'), _('REV')), + ('b', 'base', '', + _('rebase from the base of the specified changeset ' + '(up to greatest common ancestor of base and dest)'), + _('REV')), + ('d', 'dest', '', + _('rebase onto the specified changeset'), _('REV')), ('', 'collapse', False, _('collapse the rebased changesets')), ('', 'keep', False, _('keep original changesets')), ('', 'keepbranches', False, _('keep original branch names')), diff --git a/hgext/transplant.py b/hgext/transplant.py --- a/hgext/transplant.py +++ b/hgext/transplant.py @@ -592,15 +592,20 @@ def transplant(ui, repo, *revs, **opts): cmdtable = { "transplant": (transplant, - [('s', 'source', '', _('pull patches from REPOSITORY')), - ('b', 'branch', [], _('pull patches from branch BRANCH')), + [('s', 'source', '', + _('pull patches from REPO'), _('REPO')), + ('b', 'branch', [], + _('pull patches from branch BRANCH'), _('BRANCH')), ('a', 'all', None, _('pull all changesets up to BRANCH')), - ('p', 'prune', [], _('skip over REV')), - ('m', 'merge', [], _('merge at REV')), + ('p', 'prune', [], + _('skip over REV'), _('REV')), + ('m', 'merge', [], + _('merge at REV'), _('REV')), ('', 'log', None, _('append transplant info to log message')), ('c', 'continue', None, _('continue last transplant session ' 'after repair')), - ('', 'filter', '', _('filter changesets through FILTER'))], - _('hg transplant [-s REPOSITORY] [-b BRANCH [-a]] [-p REV] ' + ('', 'filter', '', + _('filter changesets through command'), _('CMD'))], + _('hg transplant [-s REPO] [-b BRANCH [-a]] [-p REV] ' '[-m REV] [REV]...')) } diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1829,17 +1829,39 @@ def help_(ui, name=None, with_version=Fa # list all option lists opt_output = [] + multioccur = False for title, options in option_lists: opt_output.append(("\n%s" % title, None)) - for shortopt, longopt, default, desc in options: + for option in options: + if len(option) == 5: + shortopt, longopt, default, desc, optlabel = option + else: + shortopt, longopt, default, desc = option + optlabel = _("VALUE") # default label + if _("DEPRECATED") in desc and not ui.verbose: continue - opt_output.append(("%2s%s" % (shortopt and "-%s" % shortopt, - longopt and " --%s" % longopt), + if isinstance(default, list): + numqualifier = " %s [+]" % optlabel + multioccur = True + elif (default is not None) and not isinstance(default, bool): + numqualifier = " %s" % optlabel + else: + numqualifier = "" + opt_output.append(("%2s%s" % + (shortopt and "-%s" % shortopt, + longopt and " --%s%s" % + (longopt, numqualifier)), "%s%s" % (desc, default and _(" (default: %s)") % default or ""))) + if multioccur: + msg = _("\n[+] marked option can be specified multiple times") + if ui.verbose and name != 'shortlist': + opt_output.append((msg, ())) + else: + opt_output.insert(-1, (msg, ())) if not name: ui.write(_("\nadditional help topics:\n\n")) @@ -3612,19 +3634,23 @@ def version_(ui): globalopts = [ ('R', 'repository', '', - _('repository root directory or name of overlay bundle file')), - ('', 'cwd', '', _('change working directory')), + _('repository root directory or name of overlay bundle file'), + _('REPO')), + ('', 'cwd', '', + _('change working directory'), _('DIR')), ('y', 'noninteractive', None, _('do not prompt, assume \'yes\' for any required answers')), ('q', 'quiet', None, _('suppress output')), ('v', 'verbose', None, _('enable additional output')), ('', 'config', [], - _('set/override config option (use \'section.name=value\')')), + _('set/override config option (use \'section.name=value\')'), + _('CONFIG')), ('', 'debug', None, _('enable debugging output')), ('', 'debugger', None, _('start debugger')), - ('', 'encoding', encoding.encoding, _('set the charset encoding')), + ('', 'encoding', encoding.encoding, _('set the charset encoding'), + _('ENCODE')), ('', 'encodingmode', encoding.encodingmode, - _('set the charset encoding mode')), + _('set the charset encoding mode'), _('MODE')), ('', 'traceback', None, _('always print a traceback on exception')), ('', 'time', None, _('time how long the command takes')), ('', 'profile', None, _('print command execution profile')), @@ -3636,34 +3662,45 @@ dryrunopts = [('n', 'dry-run', None, _('do not perform actions, just print output'))] remoteopts = [ - ('e', 'ssh', '', _('specify ssh command to use')), - ('', 'remotecmd', '', _('specify hg command to run on the remote side')), + ('e', 'ssh', '', + _('specify ssh command to use'), _('CMD')), + ('', 'remotecmd', '', + _('specify hg command to run on the remote side'), _('CMD')), ] walkopts = [ - ('I', 'include', [], _('include names matching the given patterns')), - ('X', 'exclude', [], _('exclude names matching the given patterns')), + ('I', 'include', [], + _('include names matching the given patterns'), _('PATTERN')), + ('X', 'exclude', [], + _('exclude names matching the given patterns'), _('PATTERN')), ] commitopts = [ - ('m', 'message', '', _('use as commit message')), - ('l', 'logfile', '', _('read commit message from ')), + ('m', 'message', '', + _('use text as commit message'), _('TEXT')), + ('l', 'logfile', '', + _('read commit message from file'), _('FILE')), ] commitopts2 = [ - ('d', 'date', '', _('record datecode as commit date')), - ('u', 'user', '', _('record the specified user as committer')), + ('d', 'date', '', + _('record datecode as commit date'), _('DATE')), + ('u', 'user', '', + _('record the specified user as committer'), _('USER')), ] templateopts = [ - ('', 'style', '', _('display using template map file')), - ('', 'template', '', _('display with template')), + ('', 'style', '', + _('display using template map file'), _('STYLE')), + ('', 'template', '', + _('display with template'), _('TEMPLATE')), ] logopts = [ ('p', 'patch', None, _('show patch')), ('g', 'git', None, _('use git extended diff format')), - ('l', 'limit', '', _('limit number of changes displayed')), + ('l', 'limit', '', + _('limit number of changes displayed'), _('NUM')), ('M', 'no-merges', None, _('do not show merges')), ('', 'stat', None, _('output diffstat-style summary of changes')), ] + templateopts @@ -3683,13 +3720,14 @@ diffopts2 = [ _('ignore changes in the amount of white space')), ('B', 'ignore-blank-lines', None, _('ignore changes whose lines are all blank')), - ('U', 'unified', '', _('number of lines of context to show')), + ('U', 'unified', '', + _('number of lines of context to show'), _('NUM')), ('', 'stat', None, _('output diffstat-style summary of changes')), ] similarityopts = [ ('s', 'similarity', '', - _('guess renamed files by similarity (0<=s<=100)')) + _('guess renamed files by similarity (0<=s<=100)'), _('SIMILARITY')) ] table = { @@ -3699,7 +3737,8 @@ table = { _('[OPTION]... [FILE]...')), "^annotate|blame": (annotate, - [('r', 'rev', '', _('annotate the specified revision')), + [('r', 'rev', '', + _('annotate the specified revision'), _('REV')), ('', 'follow', None, _('follow copies/renames and list the filename (DEPRECATED)')), ('', 'no-follow', None, _("don't follow copies and renames")), @@ -3716,17 +3755,22 @@ table = { "archive": (archive, [('', 'no-decode', None, _('do not pass files through decoders')), - ('p', 'prefix', '', _('directory prefix for files in archive')), - ('r', 'rev', '', _('revision to distribute')), - ('t', 'type', '', _('type of distribution to create')), + ('p', 'prefix', '', + _('directory prefix for files in archive'), _('PREFIX')), + ('r', 'rev', '', + _('revision to distribute'), _('REV')), + ('t', 'type', '', + _('type of distribution to create'), _('TYPE')), ] + walkopts, _('[OPTION]... DEST')), "backout": (backout, [('', 'merge', None, _('merge with old dirstate parent after backout')), - ('', 'parent', '', _('parent to choose when backing out merge')), - ('r', 'rev', '', _('revision to backout')), + ('', 'parent', '', + _('parent to choose when backing out merge'), _('REV')), + ('r', 'rev', '', + _('revision to backout'), _('REV')), ] + walkopts + commitopts + commitopts2, _('[OPTION]... [-r] REV')), "bisect": @@ -3735,7 +3779,8 @@ table = { ('g', 'good', False, _('mark changeset good')), ('b', 'bad', False, _('mark changeset bad')), ('s', 'skip', False, _('skip testing changeset')), - ('c', 'command', '', _('use command to check changeset state')), + ('c', 'command', '', + _('use command to check changeset state'), _('CMD')), ('U', 'noupdate', False, _('do not update to target'))], _("[-gbsr] [-U] [-c CMD] [REV]")), "branch": @@ -3756,19 +3801,25 @@ table = { [('f', 'force', None, _('run even when the destination is unrelated')), ('r', 'rev', [], - _('a changeset intended to be added to the destination')), + _('a changeset intended to be added to the destination'), + _('REV')), ('b', 'branch', [], - _('a specific branch you would like to bundle')), + _('a specific branch you would like to bundle'), + _('BRANCH')), ('', 'base', [], - _('a base changeset assumed to be available at the destination')), + _('a base changeset assumed to be available at the destination'), + _('REV')), ('a', 'all', None, _('bundle all changesets in the repository')), - ('t', 'type', 'bzip2', _('bundle compression type to use')), + ('t', 'type', 'bzip2', + _('bundle compression type to use'), _('TYPE')), ] + remoteopts, _('[-f] [-t TYPE] [-a] [-r REV]... [--base REV]... FILE [DEST]')), "cat": (cat, - [('o', 'output', '', _('print output to file with formatted name')), - ('r', 'rev', '', _('print the given revision')), + [('o', 'output', '', + _('print output to file with formatted name'), _('FORMAT')), + ('r', 'rev', '', + _('print the given revision'), _('REV')), ('', 'decode', None, _('apply any matching decode filter')), ] + walkopts, _('[OPTION]... FILE...')), @@ -3777,11 +3828,11 @@ table = { [('U', 'noupdate', None, _('the clone will include an empty working copy (only a repository)')), ('u', 'updaterev', '', - _('revision, tag or branch to check out')), + _('revision, tag or branch to check out'), _('REV')), ('r', 'rev', [], - _('include the specified changeset')), + _('include the specified changeset'), _('REV')), ('b', 'branch', [], - _('clone only the specified branch')), + _('clone only the specified branch'), _('BRANCH')), ('', 'pull', None, _('use pull protocol to copy metadata')), ('', 'uncompressed', None, _('use uncompressed transfer (fast over LAN)')), @@ -3820,11 +3871,13 @@ table = { "debuginstall": (debuginstall, [], ''), "debugrebuildstate": (debugrebuildstate, - [('r', 'rev', '', _('revision to rebuild to'))], + [('r', 'rev', '', + _('revision to rebuild to'), _('REV'))], _('[-r REV] [REV]')), "debugrename": (debugrename, - [('r', 'rev', '', _('revision to debug'))], + [('r', 'rev', '', + _('revision to debug'), _('REV'))], _('[-r REV] FILE')), "debugrevspec": (debugrevspec, [], ('REVSPEC')), @@ -3836,20 +3889,25 @@ table = { _('[OPTION]...')), "debugsub": (debugsub, - [('r', 'rev', '', _('revision to check'))], + [('r', 'rev', '', + _('revision to check'), _('REV'))], _('[-r REV] [REV]')), "debugwalk": (debugwalk, walkopts, _('[OPTION]... [FILE]...')), "^diff": (diff, - [('r', 'rev', [], _('revision')), - ('c', 'change', '', _('change made by revision')) + [('r', 'rev', [], + _('revision'), _('REV')), + ('c', 'change', '', + _('change made by revision'), _('REV')) ] + diffopts + diffopts2 + walkopts, _('[OPTION]... ([-c REV] | [-r REV1 [-r REV2]]) [FILE]...')), "^export": (export, - [('o', 'output', '', _('print output to file with formatted name')), + [('o', 'output', '', + _('print output to file with formatted name'), _('FORMAT')), ('', 'switch-parent', None, _('diff against the second parent')), - ('r', 'rev', [], _('revisions to export')), + ('r', 'rev', [], + _('revisions to export'), _('REV')), ] + diffopts, _('[OPTION]... [-o OUTFILESPEC] REV...')), "^forget": @@ -3867,14 +3925,16 @@ table = { ('l', 'files-with-matches', None, _('print only filenames and revisions that match')), ('n', 'line-number', None, _('print matching line numbers')), - ('r', 'rev', [], _('only search files changed within revision range')), + ('r', 'rev', [], + _('only search files changed within revision range'), _('REV')), ('u', 'user', None, _('list the author (long with -v)')), ('d', 'date', None, _('list the date (short with -q)')), ] + walkopts, _('[OPTION]... PATTERN [FILE]...')), "heads": (heads, - [('r', 'rev', '', _('show only heads which are descendants of REV')), + [('r', 'rev', '', + _('show only heads which are descendants of REV'), _('REV')), ('t', 'topo', False, _('show topological heads only')), ('a', 'active', False, _('show active branchheads only [DEPRECATED]')), @@ -3885,7 +3945,8 @@ table = { "help": (help_, [], _('[TOPIC]')), "identify|id": (identify, - [('r', 'rev', '', _('identify the specified revision')), + [('r', 'rev', '', + _('identify the specified revision'), _('REV')), ('n', 'num', None, _('show local revision number')), ('i', 'id', None, _('show global revision id')), ('b', 'branch', None, _('show branch')), @@ -3895,8 +3956,10 @@ table = { (import_, [('p', 'strip', 1, _('directory strip option for patch. This has the same ' - 'meaning as the corresponding patch option')), - ('b', 'base', '', _('base path')), + 'meaning as the corresponding patch option'), + _('NUM')), + ('b', 'base', '', + _('base path'), _('PATH')), ('f', 'force', None, _('skip check for outstanding uncommitted changes')), ('', 'no-commit', None, @@ -3912,11 +3975,12 @@ table = { [('f', 'force', None, _('run even if remote repository is unrelated')), ('n', 'newest-first', None, _('show newest record first')), - ('', 'bundle', '', _('file to store the bundles into')), + ('', 'bundle', '', + _('file to store the bundles into'), _('FILE')), ('r', 'rev', [], - _('a remote changeset intended to be added')), + _('a remote changeset intended to be added'), _('REV')), ('b', 'branch', [], - _('a specific branch you would like to pull')), + _('a specific branch you would like to pull'), _('BRANCH')), ] + logopts + remoteopts, _('[-p] [-n] [-M] [-f] [-r REV]...' ' [--bundle FILENAME] [SOURCE]')), @@ -3926,7 +3990,8 @@ table = { _('[-e CMD] [--remotecmd CMD] [DEST]')), "locate": (locate, - [('r', 'rev', '', _('search the repository as it is in REV')), + [('r', 'rev', '', + _('search the repository as it is in REV'), _('REV')), ('0', 'print0', None, _('end filenames with NUL, for use with xargs')), ('f', 'fullpath', None, @@ -3940,29 +4005,36 @@ table = { ' or file history across copies and renames')), ('', 'follow-first', None, _('only follow the first parent of merge changesets')), - ('d', 'date', '', _('show revisions matching date spec')), + ('d', 'date', '', + _('show revisions matching date spec'), _('DATE')), ('C', 'copies', None, _('show copied files')), - ('k', 'keyword', [], _('do case-insensitive search for a keyword')), - ('r', 'rev', [], _('show the specified revision or range')), + ('k', 'keyword', [], + _('do case-insensitive search for a given text'), _('TEXT')), + ('r', 'rev', [], + _('show the specified revision or range'), _('REV')), ('', 'removed', None, _('include revisions where files were removed')), ('m', 'only-merges', None, _('show only merges')), - ('u', 'user', [], _('revisions committed by user')), + ('u', 'user', [], + _('revisions committed by user'), _('USER')), ('', 'only-branch', [], - _('show only changesets within the given named branch (DEPRECATED)')), + _('show only changesets within the given named branch (DEPRECATED)'), + _('BRANCH')), ('b', 'branch', [], - _('show changesets within the given named branch')), + _('show changesets within the given named branch'), _('BRANCH')), ('P', 'prune', [], - _('do not display revision or any of its ancestors')), + _('do not display revision or any of its ancestors'), _('REV')), ] + logopts + walkopts, _('[OPTION]... [FILE]')), "manifest": (manifest, - [('r', 'rev', '', _('revision to display'))], + [('r', 'rev', '', + _('revision to display'), _('REV'))], _('[-r REV]')), "^merge": (merge, [('f', 'force', None, _('force a merge with outstanding changes')), - ('r', 'rev', '', _('revision to merge')), + ('r', 'rev', '', + _('revision to merge'), _('REV')), ('P', 'preview', None, _('review revisions to merge (no merge is performed)'))], _('[-P] [-f] [[-r] REV]')), @@ -3971,15 +4043,17 @@ table = { [('f', 'force', None, _('run even when the destination is unrelated')), ('r', 'rev', [], - _('a changeset intended to be included in the destination')), + _('a changeset intended to be included in the destination'), + _('REV')), ('n', 'newest-first', None, _('show newest record first')), ('b', 'branch', [], - _('a specific branch you would like to push')), + _('a specific branch you would like to push'), _('BRANCH')), ] + logopts + remoteopts, _('[-M] [-p] [-n] [-f] [-r REV]... [DEST]')), "parents": (parents, - [('r', 'rev', '', _('show parents of the specified revision')), + [('r', 'rev', '', + _('show parents of the specified revision'), _('REV')), ] + templateopts, _('[-r REV] [FILE]')), "paths": (paths, [], _('[NAME]')), @@ -3990,18 +4064,19 @@ table = { ('f', 'force', None, _('run even when remote repository is unrelated')), ('r', 'rev', [], - _('a remote changeset intended to be added')), + _('a remote changeset intended to be added'), _('REV')), ('b', 'branch', [], - _('a specific branch you would like to pull')), + _('a specific branch you would like to pull'), _('BRANCH')), ] + remoteopts, _('[-u] [-f] [-r REV]... [-e CMD] [--remotecmd CMD] [SOURCE]')), "^push": (push, [('f', 'force', None, _('force push')), ('r', 'rev', [], - _('a changeset intended to be included in the destination')), + _('a changeset intended to be included in the destination'), + _('REV')), ('b', 'branch', [], - _('a specific branch you would like to push')), + _('a specific branch you would like to push'), _('BRANCH')), ('', 'new-branch', False, _('allow pushing a new branch')), ] + remoteopts, _('[-f] [-r REV]... [-e CMD] [--remotecmd CMD] [DEST]')), @@ -4032,8 +4107,10 @@ table = { "revert": (revert, [('a', 'all', None, _('revert all changes when no arguments given')), - ('d', 'date', '', _('tipmost revision matching date')), - ('r', 'rev', '', _('revert to the specified revision')), + ('d', 'date', '', + _('tipmost revision matching date'), _('DATE')), + ('r', 'rev', '', + _('revert to the specified revision'), _('REV')), ('', 'no-backup', None, _('do not save backup copies of files')), ] + walkopts + dryrunopts, _('[OPTION]... [-r REV] [NAME]...')), @@ -4041,28 +4118,38 @@ table = { "root": (root, []), "^serve": (serve, - [('A', 'accesslog', '', _('name of access log file to write to')), + [('A', 'accesslog', '', + _('name of access log file to write to'), _('FILE')), ('d', 'daemon', None, _('run server in background')), - ('', 'daemon-pipefds', '', _('used internally by daemon mode')), - ('E', 'errorlog', '', _('name of error log file to write to')), + ('', 'daemon-pipefds', '', + _('used internally by daemon mode'), _('NUM')), + ('E', 'errorlog', '', + _('name of error log file to write to'), _('FILE')), # use string type, then we can check if something was passed - ('p', 'port', '', _('port to listen on (default: 8000)')), + ('p', 'port', '', + _('port to listen on (default: 8000)'), _('PORT')), ('a', 'address', '', - _('address to listen on (default: all interfaces)')), + _('address to listen on (default: all interfaces)'), _('ADDR')), ('', 'prefix', '', - _('prefix path to serve from (default: server root)')), + _('prefix path to serve from (default: server root)'), _('PREFIX')), ('n', 'name', '', - _('name to show in web pages (default: working directory)')), - ('', 'web-conf', '', _('name of the hgweb config file' - ' (serve more than one repository)')), - ('', 'webdir-conf', '', _('name of the hgweb config file' - ' (DEPRECATED)')), - ('', 'pid-file', '', _('name of file to write process ID to')), + _('name to show in web pages (default: working directory)'), + _('NAME')), + ('', 'web-conf', '', + _('name of the hgweb config file (serve more than one repository)'), + _('FILE')), + ('', 'webdir-conf', '', + _('name of the hgweb config file (DEPRECATED)'), _('FILE')), + ('', 'pid-file', '', + _('name of file to write process ID to'), _('FILE')), ('', 'stdio', None, _('for remote clients')), - ('t', 'templates', '', _('web templates to use')), - ('', 'style', '', _('template style to use')), + ('t', 'templates', '', + _('web templates to use'), _('TEMPLATE')), + ('', 'style', '', + _('template style to use'), _('STYLE')), ('6', 'ipv6', None, _('use IPv6 in addition to IPv4')), - ('', 'certificate', '', _('SSL certificate file'))], + ('', 'certificate', '', + _('SSL certificate file'), _('FILE'))], _('[OPTION]...')), "showconfig|debugconfig": (showconfig, @@ -4085,19 +4172,23 @@ table = { ('C', 'copies', None, _('show source of copied files')), ('0', 'print0', None, _('end filenames with NUL, for use with xargs')), - ('', 'rev', [], _('show difference from revision')), - ('', 'change', '', _('list the changed files of a revision')), + ('', 'rev', [], + _('show difference from revision'), _('REV')), + ('', 'change', '', + _('list the changed files of a revision'), _('REV')), ] + walkopts, _('[OPTION]... [FILE]...')), "tag": (tag, [('f', 'force', None, _('replace existing tag')), ('l', 'local', None, _('make the tag local')), - ('r', 'rev', '', _('revision to tag')), + ('r', 'rev', '', + _('revision to tag'), _('REV')), ('', 'remove', None, _('remove a tag')), # -l/--local is already there, commitopts cannot be used ('e', 'edit', None, _('edit commit message')), - ('m', 'message', '', _('use as commit message')), + ('m', 'message', '', + _('use as commit message'), _('TEXT')), ] + commitopts2, _('[-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME...')), "tags": (tags, [], ''), @@ -4116,8 +4207,10 @@ table = { (update, [('C', 'clean', None, _('discard uncommitted changes (no backup)')), ('c', 'check', None, _('check for uncommitted changes')), - ('d', 'date', '', _('tipmost revision matching date')), - ('r', 'rev', '', _('revision'))], + ('d', 'date', '', + _('tipmost revision matching date'), _('DATE')), + ('r', 'rev', '', + _('revision'), _('REV'))], _('[-c] [-C] [-d DATE] [[-r] REV]')), "verify": (verify, []), "version": (version_, []), diff --git a/mercurial/fancyopts.py b/mercurial/fancyopts.py --- a/mercurial/fancyopts.py +++ b/mercurial/fancyopts.py @@ -43,6 +43,7 @@ def fancyopts(args, options, state, gnu= long option default value description + option value label(optional) option types include: @@ -59,7 +60,11 @@ def fancyopts(args, options, state, gnu= argmap = {} defmap = {} - for short, name, default, comment in options: + for option in options: + if len(option) == 5: + short, name, default, comment, dummy = option + else: + short, name, default, comment = option # convert opts to getopt format oname = name name = name.replace('-', '_') diff --git a/tests/test-convert.out b/tests/test-convert.out --- a/tests/test-convert.out +++ b/tests/test-convert.out @@ -220,16 +220,16 @@ convert a foreign SCM repository to a Me options: - -A --authors username mapping filename - -d --dest-type destination repository type - --filemap remap file names using contents of file - -r --rev import up to target revision REV - -s --source-type source repository type - --splicemap splice synthesized history into place - --branchmap change branch names while converting - --branchsort try to sort changesets by branches - --datesort try to sort changesets by date - --sourcesort preserve source changesets order + -A --authors FILE username mapping filename + -d --dest-type TYPE destination repository type + --filemap FILE remap file names using contents of file + -r --rev REV import up to target revision REV + -s --source-type TYPE source repository type + --splicemap FILE splice synthesized history into place + --branchmap FILE change branch names while converting + --branchsort try to sort changesets by branches + --datesort try to sort changesets by date + --sourcesort preserve source changesets order use "hg -v help convert" to show global options adding a diff --git a/tests/test-dispatch.out b/tests/test-dispatch.out --- a/tests/test-dispatch.out +++ b/tests/test-dispatch.out @@ -21,11 +21,13 @@ output the current or given revision of options: - -o --output print output to file with formatted name - -r --rev print the given revision - --decode apply any matching decode filter - -I --include include names matching the given patterns - -X --exclude exclude names matching the given patterns + -o --output FORMAT print output to file with formatted name + -r --rev REV print the given revision + --decode apply any matching decode filter + -I --include PATTERN [+] include names matching the given patterns + -X --exclude PATTERN [+] exclude names matching the given patterns + +[+] marked option can be specified multiple times use "hg -v help cat" to show global options % [defaults] diff --git a/tests/test-extdiff.out b/tests/test-extdiff.out --- a/tests/test-extdiff.out +++ b/tests/test-extdiff.out @@ -17,11 +17,13 @@ use 'echo' to diff repository (or select options: - -o --option pass option to comparison program - -r --rev revision - -c --change change made by revision - -I --include include names matching the given patterns - -X --exclude exclude names matching the given patterns + -o --option OPT [+] pass option to comparison program + -r --rev REV [+] revision + -c --change REV change made by revision + -I --include PATTERN [+] include names matching the given patterns + -X --exclude PATTERN [+] exclude names matching the given patterns + +[+] marked option can be specified multiple times use "hg -v help falabala" to show global options diffing a.8a5febb7f867/a a.34eed99112ab/a diff --git a/tests/test-extension.out b/tests/test-extension.out --- a/tests/test-extension.out +++ b/tests/test-extension.out @@ -51,21 +51,24 @@ list of commands: yet another foo command global options: - -R --repository repository root directory or name of overlay bundle file - --cwd change working directory - -y --noninteractive do not prompt, assume 'yes' for any required answers - -q --quiet suppress output - -v --verbose enable additional output - --config set/override config option (use 'section.name=value') - --debug enable debugging output - --debugger start debugger - --encoding set the charset encoding (default: ascii) - --encodingmode set the charset encoding mode (default: strict) - --traceback always print a traceback on exception - --time time how long the command takes - --profile print command execution profile - --version output version information and exit - -h --help display help and exit + -R --repository REPO repository root directory or name of overlay bundle + file + --cwd DIR change working directory + -y --noninteractive do not prompt, assume 'yes' for any required answers + -q --quiet suppress output + -v --verbose enable additional output + --config CONFIG [+] set/override config option (use 'section.name=value') + --debug enable debugging output + --debugger start debugger + --encoding ENCODE set the charset encoding (default: ascii) + --encodingmode MODE set the charset encoding mode (default: strict) + --traceback always print a traceback on exception + --time time how long the command takes + --profile print command execution profile + --version output version information and exit + -h --help display help and exit + +[+] marked option can be specified multiple times % hg help --debug debugextension extension - only debugcommands @@ -77,21 +80,24 @@ list of commands: yet another foo command global options: - -R --repository repository root directory or name of overlay bundle file - --cwd change working directory - -y --noninteractive do not prompt, assume 'yes' for any required answers - -q --quiet suppress output - -v --verbose enable additional output - --config set/override config option (use 'section.name=value') - --debug enable debugging output - --debugger start debugger - --encoding set the charset encoding (default: ascii) - --encodingmode set the charset encoding mode (default: strict) - --traceback always print a traceback on exception - --time time how long the command takes - --profile print command execution profile - --version output version information and exit - -h --help display help and exit + -R --repository REPO repository root directory or name of overlay bundle + file + --cwd DIR change working directory + -y --noninteractive do not prompt, assume 'yes' for any required answers + -q --quiet suppress output + -v --verbose enable additional output + --config CONFIG [+] set/override config option (use 'section.name=value') + --debug enable debugging output + --debugger start debugger + --encoding ENCODE set the charset encoding (default: ascii) + --encodingmode MODE set the charset encoding mode (default: strict) + --traceback always print a traceback on exception + --time time how long the command takes + --profile print command execution profile + --version output version information and exit + -h --help display help and exit + +[+] marked option can be specified multiple times % issue811 % show extensions debugissue811 diff --git a/tests/test-help.out b/tests/test-help.out --- a/tests/test-help.out +++ b/tests/test-help.out @@ -217,21 +217,24 @@ basic commands: update working directory (or switch revisions) global options: - -R --repository repository root directory or name of overlay bundle file - --cwd change working directory - -y --noninteractive do not prompt, assume 'yes' for any required answers - -q --quiet suppress output - -v --verbose enable additional output - --config set/override config option (use 'section.name=value') - --debug enable debugging output - --debugger start debugger - --encoding set the charset encoding (default: ascii) - --encodingmode set the charset encoding mode (default: strict) - --traceback always print a traceback on exception - --time time how long the command takes - --profile print command execution profile - --version output version information and exit - -h --help display help and exit + -R --repository REPO repository root directory or name of overlay bundle + file + --cwd DIR change working directory + -y --noninteractive do not prompt, assume 'yes' for any required answers + -q --quiet suppress output + -v --verbose enable additional output + --config CONFIG [+] set/override config option (use 'section.name=value') + --debug enable debugging output + --debugger start debugger + --encoding ENCODE set the charset encoding (default: ascii) + --encodingmode MODE set the charset encoding mode (default: strict) + --traceback always print a traceback on exception + --time time how long the command takes + --profile print command execution profile + --version output version information and exit + -h --help display help and exit + +[+] marked option can be specified multiple times use "hg help" for the full list of commands hg add [OPTION]... [FILE]... @@ -249,9 +252,11 @@ use "hg -v help add" to show verbose hel options: - -I --include include names matching the given patterns - -X --exclude exclude names matching the given patterns - -n --dry-run do not perform actions, just print output + -I --include PATTERN [+] include names matching the given patterns + -X --exclude PATTERN [+] exclude names matching the given patterns + -n --dry-run do not perform actions, just print output + +[+] marked option can be specified multiple times use "hg -v help add" to show global options %% verbose help for add @@ -280,26 +285,31 @@ add the specified files on the next comm options: - -I --include include names matching the given patterns - -X --exclude exclude names matching the given patterns - -n --dry-run do not perform actions, just print output + -I --include PATTERN [+] include names matching the given patterns + -X --exclude PATTERN [+] exclude names matching the given patterns + -n --dry-run do not perform actions, just print output global options: - -R --repository repository root directory or name of overlay bundle file - --cwd change working directory - -y --noninteractive do not prompt, assume 'yes' for any required answers - -q --quiet suppress output - -v --verbose enable additional output - --config set/override config option (use 'section.name=value') - --debug enable debugging output - --debugger start debugger - --encoding set the charset encoding (default: ascii) - --encodingmode set the charset encoding mode (default: strict) - --traceback always print a traceback on exception - --time time how long the command takes - --profile print command execution profile - --version output version information and exit - -h --help display help and exit + -R --repository REPO repository root directory or name of overlay bundle + file + --cwd DIR change working directory + -y --noninteractive do not prompt, assume 'yes' for any required + answers + -q --quiet suppress output + -v --verbose enable additional output + --config CONFIG [+] set/override config option (use + 'section.name=value') + --debug enable debugging output + --debugger start debugger + --encoding ENCODE set the charset encoding (default: ascii) + --encodingmode MODE set the charset encoding mode (default: strict) + --traceback always print a traceback on exception + --time time how long the command takes + --profile print command execution profile + --version output version information and exit + -h --help display help and exit + +[+] marked option can be specified multiple times %% test help option with version option Mercurial Distributed SCM (version xxx) @@ -322,9 +332,11 @@ use "hg -v help add" to show verbose hel options: - -I --include include names matching the given patterns - -X --exclude exclude names matching the given patterns - -n --dry-run do not perform actions, just print output + -I --include PATTERN [+] include names matching the given patterns + -X --exclude PATTERN [+] exclude names matching the given patterns + -n --dry-run do not perform actions, just print output + +[+] marked option can be specified multiple times use "hg -v help add" to show global options hg add: option --skjdfks not recognized @@ -343,9 +355,11 @@ use "hg -v help add" to show verbose hel options: - -I --include include names matching the given patterns - -X --exclude exclude names matching the given patterns - -n --dry-run do not perform actions, just print output + -I --include PATTERN [+] include names matching the given patterns + -X --exclude PATTERN [+] exclude names matching the given patterns + -n --dry-run do not perform actions, just print output + +[+] marked option can be specified multiple times use "hg -v help add" to show global options %% test ambiguous command help @@ -401,8 +415,8 @@ diff repository (or selected files) options: - -r --rev revision - -c --change change made by revision + -r --rev REV [+] revision + -c --change REV change made by revision -a --text treat all files as text -g --git use git extended diff format --nodates omit dates from diff headers @@ -411,10 +425,12 @@ options: -w --ignore-all-space ignore white space when comparing lines -b --ignore-space-change ignore changes in the amount of white space -B --ignore-blank-lines ignore changes whose lines are all blank - -U --unified number of lines of context to show + -U --unified NUM number of lines of context to show --stat output diffstat-style summary of changes - -I --include include names matching the given patterns - -X --exclude exclude names matching the given patterns + -I --include PATTERN [+] include names matching the given patterns + -X --exclude PATTERN [+] exclude names matching the given patterns + +[+] marked option can be specified multiple times use "hg -v help diff" to show global options hg status [OPTION]... [FILE]... @@ -457,21 +473,23 @@ show changed files in the working direct options: - -A --all show status of all files - -m --modified show only modified files - -a --added show only added files - -r --removed show only removed files - -d --deleted show only deleted (but tracked) files - -c --clean show only files without changes - -u --unknown show only unknown (not tracked) files - -i --ignored show only ignored files - -n --no-status hide status prefix - -C --copies show source of copied files - -0 --print0 end filenames with NUL, for use with xargs - --rev show difference from revision - --change list the changed files of a revision - -I --include include names matching the given patterns - -X --exclude exclude names matching the given patterns + -A --all show status of all files + -m --modified show only modified files + -a --added show only added files + -r --removed show only removed files + -d --deleted show only deleted (but tracked) files + -c --clean show only files without changes + -u --unknown show only unknown (not tracked) files + -i --ignored show only ignored files + -n --no-status hide status prefix + -C --copies show source of copied files + -0 --print0 end filenames with NUL, for use with xargs + --rev REV [+] show difference from revision + --change REV list the changed files of a revision + -I --include PATTERN [+] include names matching the given patterns + -X --exclude PATTERN [+] exclude names matching the given patterns + +[+] marked option can be specified multiple times use "hg -v help status" to show global options hg status [OPTION]... [FILE]... diff --git a/tests/test-qrecord.out b/tests/test-qrecord.out --- a/tests/test-qrecord.out +++ b/tests/test-qrecord.out @@ -32,16 +32,18 @@ interactively record a new patch options: - -e --edit edit commit message - -g --git use git extended diff format - -U --currentuser add "From: " to patch - -u --user add "From: " to patch - -D --currentdate add "Date: " to patch - -d --date add "Date: " to patch - -I --include include names matching the given patterns - -X --exclude exclude names matching the given patterns - -m --message use as commit message - -l --logfile read commit message from + -e --edit edit commit message + -g --git use git extended diff format + -U --currentuser add "From: " to patch + -u --user USER add "From: " to patch + -D --currentdate add "Date: " to patch + -d --date DATE add "Date: " to patch + -I --include PATTERN [+] include names matching the given patterns + -X --exclude PATTERN [+] exclude names matching the given patterns + -m --message TEXT use text as commit message + -l --logfile FILE read commit message from file + +[+] marked option can be specified multiple times use "hg -v help qrecord" to show global options % base commit diff --git a/tests/test-record.out b/tests/test-record.out --- a/tests/test-record.out +++ b/tests/test-record.out @@ -28,14 +28,18 @@ interactively select changes to commit options: - -A --addremove mark new/missing files as added/removed before committing - --close-branch mark a branch as closed, hiding it from the branch list - -I --include include names matching the given patterns - -X --exclude exclude names matching the given patterns - -m --message use as commit message - -l --logfile read commit message from - -d --date record datecode as commit date - -u --user record the specified user as committer + -A --addremove mark new/missing files as added/removed before + committing + --close-branch mark a branch as closed, hiding it from the branch + list + -I --include PATTERN [+] include names matching the given patterns + -X --exclude PATTERN [+] exclude names matching the given patterns + -m --message TEXT use text as commit message + -l --logfile FILE read commit message from file + -d --date DATE record datecode as commit date + -u --user USER record the specified user as committer + +[+] marked option can be specified multiple times use "hg -v help record" to show global options % select no files