[PATCH] show value requirement and multiple occurrence of option in online help
FUJIWARA Katsunori
fujiwara at ascade.co.jp
Sun Jun 6 03:26:45 CDT 2010
# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1275812700 -32400
# Node ID cd639cbaf42f509836852b2d59fd14f4ff08db9c
# Parent 0e5ce2325795325e41f6df9203373d2858e88f88
show value requirement and multiple occurrence of option in online help
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 -r 0e5ce2325795 -r cd639cbaf42f doc/gendoc.py
--- a/doc/gendoc.py Sat Jun 05 09:58:02 2010 -0500
+++ b/doc/gendoc.py Sun Jun 06 17:25:00 2010 +0900
@@ -25,7 +25,11 @@
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 -r 0e5ce2325795 -r cd639cbaf42f hgext/bookmarks.py
--- a/hgext/bookmarks.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/bookmarks.py Sun Jun 06 17:25:00 2010 +0900
@@ -334,9 +334,9 @@
"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 -r 0e5ce2325795 -r cd639cbaf42f hgext/children.py
--- a/hgext/children.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/children.py Sun Jun 06 17:25:00 2010 +0900
@@ -38,7 +38,8 @@
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 -r 0e5ce2325795 -r cd639cbaf42f hgext/churn.py
--- a/hgext/churn.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/churn.py Sun Jun 06 17:25:00 2010 +0900
@@ -172,16 +172,19 @@
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 -r 0e5ce2325795 -r cd639cbaf42f hgext/color.py
--- a/hgext/color.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/color.py Sun Jun 06 17:25:00 2010 +0900
@@ -218,7 +218,8 @@
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 -r 0e5ce2325795 -r cd639cbaf42f hgext/convert/__init__.py
--- a/hgext/convert/__init__.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/convert/__init__.py Sun Jun 06 17:25:00 2010 +0900
@@ -258,13 +258,20 @@
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 -r 0e5ce2325795 -r cd639cbaf42f hgext/extdiff.py
--- a/hgext/extdiff.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/extdiff.py Sun Jun 06 17:25:00 2010 +0900
@@ -259,10 +259,14 @@
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 -r 0e5ce2325795 -r cd639cbaf42f hgext/fetch.py
--- a/hgext/fetch.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/fetch.py Sun Jun 06 17:25:00 2010 +0900
@@ -138,7 +138,8 @@
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 -r 0e5ce2325795 -r cd639cbaf42f hgext/gpg.py
--- a/hgext/gpg.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/gpg.py Sun Jun 06 17:25:00 2010 +0900
@@ -276,8 +276,10 @@
[('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 -r 0e5ce2325795 -r cd639cbaf42f hgext/graphlog.py
--- a/hgext/graphlog.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/graphlog.py Sun Jun 06 17:25:00 2010 +0900
@@ -369,9 +369,11 @@
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 -r 0e5ce2325795 -r cd639cbaf42f hgext/hgk.py
--- a/hgext/hgk.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/hgk.py Sun Jun 06 17:25:00 2010 +0900
@@ -314,7 +314,8 @@
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 -r 0e5ce2325795 -r cd639cbaf42f hgext/inotify/__init__.py
--- a/hgext/inotify/__init__.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/inotify/__init__.py Sun Jun 06 17:25:00 2010 +0900
@@ -79,8 +79,11 @@
'^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 -r 0e5ce2325795 -r cd639cbaf42f hgext/keyword.py
--- a/hgext/keyword.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/keyword.py Sun Jun 06 17:25:00 2010 +0900
@@ -558,7 +558,8 @@
'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 -r 0e5ce2325795 -r cd639cbaf42f hgext/mq.py
--- a/hgext/mq.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/mq.py Sun Jun 06 17:25:00 2010 +0900
@@ -2834,7 +2834,8 @@
('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":
@@ -2848,7 +2849,8 @@
"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,
@@ -2869,9 +2871,11 @@
"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...')),
@@ -2885,9 +2889,11 @@
('f', 'force', None, _('import uncommitted changes (DEPRECATED)')),
('g', 'git', None, _('use git extended diff format')),
('U', 'currentuser', None, _('add "From: <current user>" to patch')),
- ('u', 'user', '', _('add "From: <given user>" to patch')),
+ ('u', 'user', '',
+ _('add "From: <USER>" to patch'), _('USER')),
('D', 'currentdate', None, _('add "Date: <current date>" to patch')),
- ('d', 'date', '', _('add "Date: <given date>" to patch'))
+ ('d', 'date', '',
+ _('add "Date: <DATE>" to patch'), _('DATE'))
] + commands.walkopts + commands.commitopts,
_('hg qnew [-e] [-m TEXT] [-l FILE] PATCH [FILE]...')),
"qnext": (next, [] + seriesopts, _('hg qnext [-s]')),
@@ -2895,7 +2901,8 @@
"^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":
@@ -2904,7 +2911,8 @@
('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":
@@ -2916,11 +2924,11 @@
('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':
@@ -2933,7 +2941,8 @@
"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 -r 0e5ce2325795 -r cd639cbaf42f hgext/patchbomb.py
--- a/hgext/patchbomb.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/patchbomb.py Sun Jun 06 17:25:00 2010 +0900
@@ -518,14 +518,16 @@
('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 -r 0e5ce2325795 -r cd639cbaf42f hgext/rebase.py
--- a/hgext/rebase.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/rebase.py Sun Jun 06 17:25:00 2010 +0900
@@ -538,10 +538,14 @@
"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 -r 0e5ce2325795 -r cd639cbaf42f hgext/transplant.py
--- a/hgext/transplant.py Sat Jun 05 09:58:02 2010 -0500
+++ b/hgext/transplant.py Sun Jun 06 17:25:00 2010 +0900
@@ -591,15 +591,20 @@
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 -r 0e5ce2325795 -r cd639cbaf42f mercurial/commands.py
--- a/mercurial/commands.py Sat Jun 05 09:58:02 2010 -0500
+++ b/mercurial/commands.py Sun Jun 06 17:25:00 2010 +0900
@@ -1799,17 +1799,39 @@
# 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"))
@@ -3577,19 +3599,23 @@
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')),
@@ -3601,34 +3627,45 @@
_('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 <text> as commit message')),
- ('l', 'logfile', '', _('read commit message from <file>')),
+ ('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
@@ -3648,13 +3685,14 @@
_('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 = {
@@ -3664,7 +3702,8 @@
_('[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")),
@@ -3681,17 +3720,22 @@
"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":
@@ -3700,7 +3744,8 @@
('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":
@@ -3721,19 +3766,25 @@
[('f', 'force', None,
_('run even when the destination is unrelated')),
('r', 'rev', [],
- _('a changeset intended to be added to the destination')),
- ('b', 'branch', [],
- _('a specific branch you would like to bundle')),
+ _('a changeset intended to be added to the destination'),
+ _('REV')),
+ ('b', 'branch', [],
+ _('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...')),
@@ -3742,11 +3793,11 @@
[('U', 'noupdate', None,
_('the clone will include an empty working copy (only a repository)')),
('u', 'updaterev', '',
- _('revision, tag or branch to check out')),
- ('r', 'rev', [],
- _('include the specified changeset')),
- ('b', 'branch', [],
- _('clone only the specified branch')),
+ _('revision, tag or branch to check out'), _('REV')),
+ ('r', 'rev', [],
+ _('include the specified changeset'), _('REV')),
+ ('b', 'branch', [],
+ _('clone only the specified branch'), _('BRANCH')),
('', 'pull', None, _('use pull protocol to copy metadata')),
('', 'uncompressed', None,
_('use uncompressed transfer (fast over LAN)')),
@@ -3785,11 +3836,13 @@
"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')),
@@ -3801,20 +3854,25 @@
_('[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":
@@ -3832,14 +3890,16 @@
('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]')),
@@ -3850,7 +3910,8 @@
"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')),
@@ -3860,8 +3921,10 @@
(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,
@@ -3877,11 +3940,12 @@
[('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')),
- ('r', 'rev', [],
- _('a remote changeset intended to be added')),
- ('b', 'branch', [],
- _('a specific branch you would like to pull')),
+ ('', 'bundle', '',
+ _('file to store the bundles into'), _('FILE')),
+ ('r', 'rev', [],
+ _('a remote changeset intended to be added'), _('REV')),
+ ('b', 'branch', [],
+ _('a specific branch you would like to pull'), _('BRANCH')),
] + logopts + remoteopts,
_('[-p] [-n] [-M] [-f] [-r REV]...'
' [--bundle FILENAME] [SOURCE]')),
@@ -3891,7 +3955,8 @@
_('[-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,
@@ -3905,29 +3970,36 @@
' 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)')),
- ('b', 'branch', [],
- _('show changesets within the given named branch')),
+ _('show only changesets within the given named branch (DEPRECATED)'),
+ _('BRANCH')),
+ ('b', '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]')),
@@ -3936,15 +4008,17 @@
[('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]')),
@@ -3955,18 +4029,19 @@
('f', 'force', None,
_('run even when remote repository is unrelated')),
('r', 'rev', [],
- _('a remote changeset intended to be added')),
- ('b', 'branch', [],
- _('a specific branch you would like to pull')),
+ _('a remote changeset intended to be added'), _('REV')),
+ ('b', 'branch', [],
+ _('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')),
- ('b', 'branch', [],
- _('a specific branch you would like to push')),
+ _('a changeset intended to be included in the destination'),
+ _('REV')),
+ ('b', 'branch', [],
+ _('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]')),
@@ -3997,8 +4072,10 @@
"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]...')),
@@ -4006,28 +4083,38 @@
"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,
@@ -4050,19 +4137,23 @@
('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 <text> as commit message')),
+ ('m', 'message', '',
+ _('use <text> as commit message'), _('TEXT')),
] + commitopts2,
_('[-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME...')),
"tags": (tags, [], ''),
@@ -4081,8 +4172,10 @@
(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 -r 0e5ce2325795 -r cd639cbaf42f mercurial/fancyopts.py
--- a/mercurial/fancyopts.py Sat Jun 05 09:58:02 2010 -0500
+++ b/mercurial/fancyopts.py Sun Jun 06 17:25:00 2010 +0900
@@ -43,6 +43,7 @@
long option
default value
description
+ option value label(optional)
option types include:
@@ -59,7 +60,11 @@
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 -r 0e5ce2325795 -r cd639cbaf42f tests/test-convert.out
--- a/tests/test-convert.out Sat Jun 05 09:58:02 2010 -0500
+++ b/tests/test-convert.out Sun Jun 06 17:25:00 2010 +0900
@@ -220,16 +220,16 @@
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 -r 0e5ce2325795 -r cd639cbaf42f tests/test-dispatch.out
--- a/tests/test-dispatch.out Sat Jun 05 09:58:02 2010 -0500
+++ b/tests/test-dispatch.out Sun Jun 06 17:25:00 2010 +0900
@@ -21,11 +21,13 @@
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 -r 0e5ce2325795 -r cd639cbaf42f tests/test-extdiff.out
--- a/tests/test-extdiff.out Sat Jun 05 09:58:02 2010 -0500
+++ b/tests/test-extdiff.out Sun Jun 06 17:25:00 2010 +0900
@@ -17,11 +17,13 @@
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 -r 0e5ce2325795 -r cd639cbaf42f tests/test-extension.out
--- a/tests/test-extension.out Sat Jun 05 09:58:02 2010 -0500
+++ b/tests/test-extension.out Sun Jun 06 17:25:00 2010 +0900
@@ -51,21 +51,24 @@
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 @@
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 -r 0e5ce2325795 -r cd639cbaf42f tests/test-help.out
--- a/tests/test-help.out Sat Jun 05 09:58:02 2010 -0500
+++ b/tests/test-help.out Sun Jun 06 17:25:00 2010 +0900
@@ -217,21 +217,24 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
-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 @@
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 -r 0e5ce2325795 -r cd639cbaf42f tests/test-qrecord.out
--- a/tests/test-qrecord.out Sat Jun 05 09:58:02 2010 -0500
+++ b/tests/test-qrecord.out Sun Jun 06 17:25:00 2010 +0900
@@ -32,16 +32,18 @@
options:
- -e --edit edit commit message
- -g --git use git extended diff format
- -U --currentuser add "From: <current user>" to patch
- -u --user add "From: <given user>" to patch
- -D --currentdate add "Date: <current date>" to patch
- -d --date add "Date: <given date>" to patch
- -I --include include names matching the given patterns
- -X --exclude exclude names matching the given patterns
- -m --message use <text> as commit message
- -l --logfile read commit message from <file>
+ -e --edit edit commit message
+ -g --git use git extended diff format
+ -U --currentuser add "From: <current user>" to patch
+ -u --user USER add "From: <USER>" to patch
+ -D --currentdate add "Date: <current date>" to patch
+ -d --date DATE add "Date: <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 -r 0e5ce2325795 -r cd639cbaf42f tests/test-record.out
--- a/tests/test-record.out Sat Jun 05 09:58:02 2010 -0500
+++ b/tests/test-record.out Sun Jun 06 17:25:00 2010 +0900
@@ -28,14 +28,18 @@
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 <text> as commit message
- -l --logfile read commit message from <file>
- -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
More information about the Mercurial-devel
mailing list