help: new default help

Summary:
Replace the default help for Mercurial with a curated list of interesting
commands, categorized by their use case.

Reviewed By: phillco

Differential Revision: D10356916

fbshipit-source-id: 65e578a4bfde7b0ad04e7107f4e77d8ea882d78a
This commit is contained in:
Mark Thomas 2018-10-15 09:35:15 -07:00 committed by Facebook Github Bot
parent 0e9d69b41e
commit 36c697f8e0
24 changed files with 717 additions and 876 deletions

View File

@ -129,7 +129,7 @@ configitem("fastmanifest", "usetree", default=False)
@command(
"^debugcachemanifest",
"debugcachemanifest",
[
("r", "rev", [], "cache the manifest for revs", "REV"),
("a", "all", False, "cache all relevant revisions", ""),
@ -183,7 +183,7 @@ def debugcachemanifest(ui, repo, *pats, **opts):
cachemanager.cachemanifestfillandtrim(ui, repo, revset)
@command("^cachemanifest", [], "hg cachemanifest")
@command("cachemanifest", [], "hg cachemanifest")
def cachemanifest(ui, repo, *pats, **opts):
cachemanager.cacher.cachemanifest(repo)

View File

@ -3067,8 +3067,8 @@ def heads(ui, repo, *branchrevs, **opts):
@command(
"help",
[
("e", "extension", None, _("show only help for extensions")),
("c", "command", None, _("show only help for commands")),
("e", "extension", None, _("show help for extensions")),
("c", "command", None, _("show help for commands")),
("k", "keyword", None, _("show topics matching keyword")),
("s", "system", [], _("show help for specific platform(s)")),
],

View File

@ -604,7 +604,7 @@ def _callcatch(ui, func):
else:
ui.pager("help")
ui.warn(_("hg: %s\n") % inst.args[1])
commands.help_(ui, "shortlist")
commands.help_(ui)
except error.ParseError as inst:
_formatparse(ui.warn, inst)
return -1
@ -627,7 +627,7 @@ def _callcatch(ui, func):
if not suggested:
ui.pager("help")
ui.warn(nocmdmsg)
commands.help_(ui, "shortlist")
commands.help_(ui)
except error.UnknownSubcommand as inst:
cmd, subcmd, allsubcmds = inst.args
suggested = False
@ -1275,7 +1275,7 @@ def _dispatch(req):
if options["help"]:
return commands.help_(ui, cmd, command=cmd is not None)
elif not cmd:
return commands.help_(ui, "shortlist")
return commands.help_(ui)
repo = None
deferred = []

View File

@ -59,9 +59,9 @@ def listexts(header, exts, indent=1, showdeprecated=False):
def extshelp(ui):
rst = loaddoc("extensions")(ui).splitlines(True)
rst.extend(
listexts(_("enabled extensions:"), extensions.enabled(), showdeprecated=True)
listexts(_("Enabled extensions:"), extensions.enabled(), showdeprecated=True)
)
rst.extend(listexts(_("disabled extensions:"), extensions.disabled()))
rst.extend(listexts(_("Disabled extensions:"), extensions.disabled()))
doc = "".join(rst)
return doc
@ -339,7 +339,7 @@ def makesubcmdlist(cmd, subcommands, verbose, quiet):
rst.extend(sorted(cmdhelp))
if not quiet:
rst.append(
_("\n(use 'hg help %s [subcommand]' " "to show complete subcommand help)\n")
_("\n(use 'hg help %s [subcommand]' to show complete subcommand help)\n")
% cmd
)
return rst
@ -363,6 +363,20 @@ addtopicsymbols("templates", ".. filtersmarker", templatefilters.filters)
addtopicsymbols("templates", ".. functionsmarker", templater.funcs)
addtopicsymbols("hgweb", ".. webcommandsmarker", webcommands.commands, dedent=True)
helphomecommands = [
("Create repositories", {"init", "clone"}),
("Examine files in your current checkout", {"status", "grep"}),
("Work on your current checkout", {"add", "remove", "rename", "copy"}),
("Commit changes and modify commits", {"commit", "amend", "absorb", "metaedit"}),
("Look at commits and commit history", {"log", "show", "diff", "smartlog"}),
("Checkout other commits", {"checkout", "next", "previous"}),
("Rearrange commits", {"rebase", "histedit", "fold", "split", "graft", "hide"}),
("Undo changes", {"undo", "uncommit", "unamend", "redo"}),
("Exchange commits with a server", {"pull", "push", "prefetch"}),
]
helphometopics = {"revisions", "glossary", "patterns", "templating"}
class _helpdispatch(object):
def __init__(
@ -407,7 +421,7 @@ class _helpdispatch(object):
# py3k fix: except vars can't be used outside the scope of the
# except block, nor can be used inside a lambda. python issue4617
prefix = inst.args[0]
select = lambda c: c.lstrip("^").startswith(prefix)
select = lambda c: c.lstrip("^").partition("|")[0].startswith(prefix)
rst = self.helplist(name, select)
return rst
except error.UnknownSubcommand as inst:
@ -471,20 +485,21 @@ class _helpdispatch(object):
mod = extensions.find(name)
doc = gettext(pycompat.getdoc(mod)) or ""
if "\n" in doc.strip():
msg = _(
"(use 'hg help -e %s' to show help for " "the %s extension)"
) % (name, name)
msg = _("(use 'hg help -e %s' to show help for the %s extension)") % (
name,
name,
)
rst.append("\n%s\n" % msg)
except KeyError:
pass
# options
if not self.ui.quiet and entry[1]:
rst.append(optrst(_("options"), entry[1], self.ui.verbose))
rst.append(optrst(_("Options"), entry[1], self.ui.verbose))
if self.ui.verbose:
rst.append(
optrst(_("global options"), self.commands.globalopts, self.ui.verbose)
optrst(_("Global options"), self.commands.globalopts, self.ui.verbose)
)
# subcommands
@ -500,52 +515,32 @@ class _helpdispatch(object):
rst.append(_("\n(use 'hg %s -h' to show more help)\n") % name)
elif not self.ui.quiet:
rst.append(
_("\n(some details hidden, use --verbose " "to show complete help)")
_("\n(some details hidden, use --verbose to show complete help)")
)
return rst
def helplist(self, name, select=None, **opts):
# list of commands
if name == "shortlist":
header = _("basic commands:\n\n")
elif name == "debug":
header = _("debug commands (internal and unsupported):\n\n")
else:
header = _("list of commands:\n\n")
def helpcmdlist(self, name, select=None):
h = {}
cmds = {}
for c, e in self.commands.table.iteritems():
f = c.partition("|")[0]
if select and not select(f):
if select and not select(c):
continue
if (
not select
and name != "shortlist"
and e[0].__module__ != self.commands.__name__
):
continue
if name == "shortlist" and not f.startswith("^"):
continue
f = f.lstrip("^")
f = c.lstrip("^").partition("|")[0]
doc = pycompat.getdoc(e[0])
if filtercmd(self.ui, f, name, doc):
continue
doc = gettext(doc)
if doc:
doc = doc.splitlines()[0].rstrip()
if not doc:
doc = _("(no help text available)")
h[f] = doc.splitlines()[0].rstrip()
h[f] = doc
cmds[f] = c.lstrip("^")
rst = []
if not h:
if not self.ui.quiet:
rst.append(_("no commands defined\n"))
return rst
if not self.ui.quiet:
rst.append(header)
return [], {}
rst = []
fns = sorted(h)
for f in fns:
if self.ui.verbose:
@ -553,59 +548,56 @@ class _helpdispatch(object):
rst.append(" :%s: %s\n" % (commacmds, h[f]))
else:
rst.append(" :%s: %s\n" % (f, h[f]))
return rst, cmds
ex = self.opts.get
anyopts = ex(r"keyword") or not (ex(r"command") or ex(r"extension"))
if not name and anyopts:
exts = listexts(_("enabled extensions:"), extensions.enabled())
if exts:
rst.append("\n")
rst.extend(exts)
def helplist(self, name, select=None, **opts):
# list of commands
rst, cmds = self.helpcmdlist(name, select)
if not rst:
if not self.ui.quiet:
rst.append(_("no commands defined\n"))
return rst
rst.append(_("\nadditional help topics:\n\n"))
topics = []
for names, header, doc in helptable:
topics.append((names[0], header))
for t, desc in topics:
rst.append(" :%s: %s\n" % (t, desc))
if self.ui.quiet:
pass
elif self.ui.verbose:
rst.append(
"\n%s\n"
% optrst(_("global options"), self.commands.globalopts, self.ui.verbose)
)
if name == "shortlist":
rst.append(_("\n(use 'hg help' for the full list " "of commands)\n"))
else:
if name == "shortlist":
rst.append(
_(
"\n(use 'hg help' for the full list of commands "
"or 'hg -v' for details)\n"
)
)
elif name and not self.full:
rst.append(
_("\n(use 'hg help %s' to show the full help " "text)\n") % name
)
elif name and cmds and name in cmds.keys():
rst.append(
_(
"\n(use 'hg help -v -e %s' to show built-in "
"aliases and global options)\n"
)
% name
)
if not self.ui.quiet:
if name == "debug":
header = _("Debug commands (internal and unsupported):\n\n")
else:
rst.append(
_(
"\n(use 'hg help -v%s' to show built-in aliases "
"and global options)\n"
)
% (name and " " + name or "")
)
header = _("Commands:\n\n")
rst.insert(0, header)
return rst
def helphome(self):
rst = [
_("Mercurial Distributed SCM\n"),
"\n",
"hg COMMAND [OPTIONS]\n",
"\n",
"These are some common Mercurial commands. Use 'hg help commands' to list all "
"commands, and 'hg help COMMAND' to get help on a specific command.\n",
"\n",
]
for desc, commands in helphomecommands:
def match(cmdspec):
return any(c in commands for c in cmdspec.lstrip("^").split("|"))
sectionrst, sectioncmds = self.helpcmdlist(None, match)
if sectionrst:
rst.append(desc + ":\n\n")
rst.extend(sectionrst)
rst.append("\n")
topics = []
for names, header, doc in helptable:
if names[0] in helphometopics:
topics.append((names[0], header))
if topics:
rst.append(_("\nAdditional help topics:\n\n"))
for t, desc in topics:
rst.append(" :%s: %s\n" % (t, desc.lower()))
return rst
def helptopic(self, name, subtopic=None):
@ -632,13 +624,13 @@ class _helpdispatch(object):
rst += [" %s\n" % l for l in doc(self.ui).splitlines()]
if not self.ui.verbose:
omitted = _("(some details hidden, use --verbose" " to show complete help)")
omitted = _("(some details hidden, use --verbose to show complete help)")
indicateomitted(rst, omitted)
try:
cmdutil.findcmd(name, self.commands.table)
rst.append(
_("\nuse 'hg help -c %s' to see help for " "the %s command\n")
_("\nuse 'hg help -c %s' to see help for the %s command\n")
% (name, name)
)
except error.UnknownCommand:
@ -665,7 +657,7 @@ class _helpdispatch(object):
rst.append("\n")
if not self.ui.verbose:
omitted = _("(some details hidden, use --verbose" " to show complete help)")
omitted = _("(some details hidden, use --verbose to show complete help)")
indicateomitted(rst, omitted)
if mod:
@ -673,8 +665,7 @@ class _helpdispatch(object):
ct = mod.cmdtable
except AttributeError:
ct = {}
modcmds = set([c.partition("|")[0] for c in ct])
rst.extend(self.helplist(name, modcmds.__contains__))
rst.extend(self.helplist(name, ct.__contains__))
else:
rst.append(
_(
@ -695,14 +686,14 @@ class _helpdispatch(object):
doc = doc.splitlines()[0]
rst = listexts(
_("'%s' is provided by the following " "extension:") % cmd,
_("'%s' is provided by the following extension:") % cmd,
{ext: doc},
indent=4,
showdeprecated=True,
)
rst.append("\n")
rst.append(
_("(use 'hg help extensions' for information on enabling " "extensions)\n")
_("(use 'hg help extensions' for information on enabling extensions)\n")
)
return rst
@ -741,13 +732,14 @@ def help_(ui, commands, name, unknowncmd=False, full=True, subtopic=None, **opts
msg = _("no matches")
hint = _("try 'hg help' for a list of topics")
raise error.Abort(msg, hint=hint)
elif name and name != "shortlist":
rst = dispatch.dispatch(name)
else:
# program name
elif name == "commands":
if not ui.quiet:
rst = [_("Mercurial Distributed SCM\n"), "\n"]
rst.extend(dispatch.helplist(name, None, **pycompat.strkwargs(opts)))
rst.extend(dispatch.helplist(None, None, **pycompat.strkwargs(opts)))
elif name:
rst = dispatch.dispatch(name)
else:
rst = dispatch.helphome()
return "".join(rst)

View File

@ -465,88 +465,172 @@ invalid global arguments for normal commands, aliases, and shell aliases
hg: option --invalid not recognized
Mercurial Distributed SCM
basic commands:
hg COMMAND [OPTIONS]
These are some common Mercurial commands. Use 'hg help commands' to list all
commands, and 'hg help COMMAND' to get help on a specific command.
Create repositories:
clone make a copy of an existing repository
init create a new repository in the given directory
Examine files in your current checkout:
grep search revision history for a pattern in specified files
status show changed files in the working directory
Work on your current checkout:
add add the specified files on the next commit
annotate show changeset information by line for each file
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
githelp suggests the Mercurial equivalent of the given git command
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge another revision into working directory
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
copy mark files as copied for the next commit
remove remove the specified files on the next commit
serve start stand-alone webserver
rename rename files; equivalent of copy + remove
Commit changes and modify commits:
commit commit the specified files or all outstanding changes
Look at commits and commit history:
diff diff repository (or selected files)
log show revision history of entire repository or files
show show revision in detail
status show changed files in the working directory
summary summarize working directory state
Checkout other commits:
update update working directory (or switch revisions)
(use 'hg help' for the full list of commands or 'hg -v' for details)
Rearrange commits:
graft copy changes from other branches onto the current branch
rebase move changeset (and descendants) to a different branch
Exchange commits with a server:
pull pull changes from the specified source
push push changes to the specified destination
Additional help topics:
glossary glossary
patterns file name patterns
revisions specifying revisions
templating template usage
[255]
$ hg --invalid mylog
hg: option --invalid not recognized
Mercurial Distributed SCM
basic commands:
hg COMMAND [OPTIONS]
These are some common Mercurial commands. Use 'hg help commands' to list all
commands, and 'hg help COMMAND' to get help on a specific command.
Create repositories:
clone make a copy of an existing repository
init create a new repository in the given directory
Examine files in your current checkout:
grep search revision history for a pattern in specified files
status show changed files in the working directory
Work on your current checkout:
add add the specified files on the next commit
annotate show changeset information by line for each file
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
githelp suggests the Mercurial equivalent of the given git command
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge another revision into working directory
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
copy mark files as copied for the next commit
remove remove the specified files on the next commit
serve start stand-alone webserver
rename rename files; equivalent of copy + remove
Commit changes and modify commits:
commit commit the specified files or all outstanding changes
Look at commits and commit history:
diff diff repository (or selected files)
log show revision history of entire repository or files
show show revision in detail
status show changed files in the working directory
summary summarize working directory state
Checkout other commits:
update update working directory (or switch revisions)
(use 'hg help' for the full list of commands or 'hg -v' for details)
Rearrange commits:
graft copy changes from other branches onto the current branch
rebase move changeset (and descendants) to a different branch
Exchange commits with a server:
pull pull changes from the specified source
push push changes to the specified destination
Additional help topics:
glossary glossary
patterns file name patterns
revisions specifying revisions
templating template usage
[255]
$ hg --invalid blank
hg: option --invalid not recognized
Mercurial Distributed SCM
basic commands:
hg COMMAND [OPTIONS]
These are some common Mercurial commands. Use 'hg help commands' to list all
commands, and 'hg help COMMAND' to get help on a specific command.
Create repositories:
clone make a copy of an existing repository
init create a new repository in the given directory
Examine files in your current checkout:
grep search revision history for a pattern in specified files
status show changed files in the working directory
Work on your current checkout:
add add the specified files on the next commit
annotate show changeset information by line for each file
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
githelp suggests the Mercurial equivalent of the given git command
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge another revision into working directory
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
copy mark files as copied for the next commit
remove remove the specified files on the next commit
serve start stand-alone webserver
rename rename files; equivalent of copy + remove
Commit changes and modify commits:
commit commit the specified files or all outstanding changes
Look at commits and commit history:
diff diff repository (or selected files)
log show revision history of entire repository or files
show show revision in detail
status show changed files in the working directory
summary summarize working directory state
Checkout other commits:
update update working directory (or switch revisions)
(use 'hg help' for the full list of commands or 'hg -v' for details)
Rearrange commits:
graft copy changes from other branches onto the current branch
rebase move changeset (and descendants) to a different branch
Exchange commits with a server:
pull pull changes from the specified source
push push changes to the specified destination
Additional help topics:
glossary glossary
patterns file name patterns
revisions specifying revisions
templating template usage
[255]
environment variable changes in alias commands

View File

@ -11,7 +11,7 @@ Check help text for new options and removal of unsupported options.
update to child changeset
options:
Options:
--clean discard uncommitted changes (no backup)
--newest always pick the newest child when a changeset has

View File

@ -14,7 +14,7 @@ Check help text for new options and removal of unsupported options.
update to parent changeset
options:
Options:
--clean discard uncommitted changes (no backup)
--newest always pick the newest parent when a changeset has

View File

@ -60,30 +60,57 @@ typical client does not want echo-back messages, so test without it:
*** runcommand
Mercurial Distributed SCM
basic commands:
hg COMMAND [OPTIONS]
These are some common Mercurial commands. Use 'hg help commands' to list all
commands, and 'hg help COMMAND' to get help on a specific command.
Create repositories:
clone make a copy of an existing repository
init create a new repository in the given directory
Examine files in your current checkout:
grep search revision history for a pattern in specified files
status show changed files in the working directory
Work on your current checkout:
add add the specified files on the next commit
annotate show changeset information by line for each file
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
githelp suggests the Mercurial equivalent of the given git command
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge another revision into working directory
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
copy mark files as copied for the next commit
remove remove the specified files on the next commit
serve start stand-alone webserver
rename rename files; equivalent of copy + remove
Commit changes and modify commits:
commit commit the specified files or all outstanding changes
Look at commits and commit history:
diff diff repository (or selected files)
log show revision history of entire repository or files
show show revision in detail
status show changed files in the working directory
summary summarize working directory state
Checkout other commits:
update update working directory (or switch revisions)
(use 'hg help' for the full list of commands or 'hg -v' for details)
Rearrange commits:
graft copy changes from other branches onto the current branch
Exchange commits with a server:
pull pull changes from the specified source
push push changes to the specified destination
Additional help topics:
glossary glossary
patterns file name patterns
revisions specifying revisions
templating template usage
*** runcommand id --quiet
000000000000
*** runcommand id

View File

@ -41,7 +41,7 @@ perfstatus
$ hg help perfstatusext
perfstatusext extension - helper extension to measure performance
list of commands:
Commands:
perfaddremove
(no help text available)
@ -119,8 +119,6 @@ perfstatus
benchmark the computation of various volatile set
perfwalk (no help text available)
perfwrite microbenchmark ui.write
(use 'hg help -v perfstatusext' to show built-in aliases and global options)
$ hg perfaddremove
$ hg perfancestors
$ hg perfancestorset 2

View File

@ -376,7 +376,7 @@
does not convert tags from the source repo to the target
repo. The default is False.
options ([+] can be repeated):
Options ([+] can be repeated):
-s --source-type TYPE source repository type
-d --dest-type TYPE destination repository type

View File

@ -19,7 +19,7 @@ Missing arg:
output the current or given revision of files
options ([+] can be repeated):
Options ([+] can be repeated):
-o --output FORMAT print output to file with formatted name
-r --rev REV print the given revision

View File

@ -49,7 +49,7 @@ check alignment of option descriptions in help
dummy command to show option descriptions
options:
Options:
-s --opt1 \xe7\x9f\xad\xe5\x90\x8d short width \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d \xe7\x9f\xad\xe5\x90\x8d (esc)
-m --opt2 MIDDLE_ middle width MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_ MIDDLE_

View File

@ -43,7 +43,7 @@ Should diff cloned directories:
compared to the working directory, and, when no revisions are specified,
the working directory files are compared to its parent.
options ([+] can be repeated):
Options ([+] can be repeated):
-o --option OPT [+] pass option to comparison program
-r --rev REV [+] revision

View File

@ -585,7 +585,7 @@ hide outer repo
show information about active extensions
options:
Options:
--excludedefault exclude extensions marked as default-on
@ -597,12 +597,12 @@ hide outer repo
show information about active extensions
options:
Options:
--excludedefault exclude extensions marked as default-on
-T --template TEMPLATE display with template (EXPERIMENTAL)
global options ([+] can be repeated):
Global options ([+] can be repeated):
-R --repository REPO repository root directory or name of overlay bundle
file
@ -639,12 +639,12 @@ hide outer repo
show information about active extensions
options:
Options:
--excludedefault exclude extensions marked as default-on
-T --template TEMPLATE display with template (EXPERIMENTAL)
global options ([+] can be repeated):
Global options ([+] can be repeated):
-R --repository REPO repository root directory or name of overlay bundle
file
@ -710,7 +710,7 @@ Extension module help vs command help:
(use 'hg help -e extdiff' to show help for the extdiff extension)
options ([+] can be repeated):
Options ([+] can be repeated):
-p --program CMD comparison program to run
-o --option OPT [+] pass option to comparison program
@ -784,11 +784,9 @@ Extension module help vs command help:
running the external diff program will actually be pretty fast (at least
faster than having to compare the entire tree).
list of commands:
Commands:
extdiff use external program to diff repository (or selected files)
(use 'hg help -v -e extdiff' to show built-in aliases and global options)
@ -898,59 +896,29 @@ along with extension help itself
$ echo "dodo = $dodopath" >> $HGRCPATH
Make sure that user is asked to enter '-v -e' to get list of built-in aliases
Make sure that '-e' prints help for the extension.
$ hg help -e dodo
dodo extension -
This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo'
list of commands:
Commands:
dodo Does nothing
foofoo Writes 'Foo foo'
(use 'hg help -v -e dodo' to show built-in aliases and global options)
Make sure that '-v -e' prints list of built-in aliases along with
extension help itself
Make sure that '-v -e' prints help for the extension.
$ hg help -v -e dodo
dodo extension -
This is an awesome 'dodo' extension. It does nothing and writes 'Foo foo'
list of commands:
Commands:
dodo Does nothing
foofoo Writes 'Foo foo'
global options ([+] can be repeated):
-R --repository REPO repository root directory or name of overlay bundle
file
--cwd DIR change working directory
-y --noninteractive do not prompt, automatically pick the first choice
for all prompts
-q --quiet suppress output
-v --verbose enable additional output
--color TYPE when to colorize (boolean, always, auto, never, or
debug)
--config CONFIG [+] set/override config option (use
'section.name=value')
--configfile FILE [+] enables the given config file
--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
--hidden consider hidden changesets
--pager TYPE when to paginate (boolean, always, auto, or never)
(default: auto)
Make sure that single '-v' option shows help and built-ins only for 'dodo' command
Make sure that single '-v' option shows help and global options for the 'dodo' command
$ hg help -v dodo
hg dodo
@ -958,7 +926,7 @@ Make sure that single '-v' option shows help and built-ins only for 'dodo' comma
(use 'hg help -e dodo' to show help for the dodo extension)
global options ([+] can be repeated):
Global options ([+] can be repeated):
-R --repository REPO repository root directory or name of overlay bundle
file
@ -1015,12 +983,10 @@ along with extension help
This is an awesome 'dudu' extension. It does something and also writes 'Beep
beep'
list of commands:
Commands:
beep Writes 'Beep beep'
something Does something
(use 'hg help -v dudu' to show built-in aliases and global options)
In case when extension name doesn't match any of its commands,
help options '-v' and '-v -e' should be equivalent
@ -1030,37 +996,10 @@ help options '-v' and '-v -e' should be equivalent
This is an awesome 'dudu' extension. It does something and also writes 'Beep
beep'
list of commands:
Commands:
beep Writes 'Beep beep'
something Does something
global options ([+] can be repeated):
-R --repository REPO repository root directory or name of overlay bundle
file
--cwd DIR change working directory
-y --noninteractive do not prompt, automatically pick the first choice
for all prompts
-q --quiet suppress output
-v --verbose enable additional output
--color TYPE when to colorize (boolean, always, auto, never, or
debug)
--config CONFIG [+] set/override config option (use
'section.name=value')
--configfile FILE [+] enables the given config file
--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
--hidden consider hidden changesets
--pager TYPE when to paginate (boolean, always, auto, or never)
(default: auto)
$ hg help -v -e dudu
dudu extension -
@ -1068,37 +1007,10 @@ help options '-v' and '-v -e' should be equivalent
This is an awesome 'dudu' extension. It does something and also writes 'Beep
beep'
list of commands:
Commands:
beep Writes 'Beep beep'
something Does something
global options ([+] can be repeated):
-R --repository REPO repository root directory or name of overlay bundle
file
--cwd DIR change working directory
-y --noninteractive do not prompt, automatically pick the first choice
for all prompts
-q --quiet suppress output
-v --verbose enable additional output
--color TYPE when to colorize (boolean, always, auto, never, or
debug)
--config CONFIG [+] set/override config option (use
'section.name=value')
--configfile FILE [+] enables the given config file
--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
--hidden consider hidden changesets
--pager TYPE when to paginate (boolean, always, auto, or never)
(default: auto)
Disabled extension commands:

View File

@ -444,7 +444,7 @@ Test config option absorb.amendflags and running as a sub command of amend:
(no help text available)
options:
Options:
--correlated incorporate corrections into stack. see 'hg help absorb' for
details

View File

@ -292,200 +292,114 @@ Testing -h/--help:
$ hg -h
Mercurial Distributed SCM
list of commands:
hg COMMAND [OPTIONS]
These are some common Mercurial commands. Use 'hg help commands' to list all
commands, and 'hg help COMMAND' to get help on a specific command.
Create repositories:
clone make a copy of an existing repository
init create a new repository in the given directory
Examine files in your current checkout:
grep search revision history for a pattern in specified files
status show changed files in the working directory
Work on your current checkout:
add add the specified files on the next commit
addremove add all new files, delete all missing files
annotate show changeset information by line for each file
archive create an unversioned archive of a repository revision
backout reverse effect of earlier changeset
bisect subdivision search of changesets
bookmarks create a new bookmark or list existing bookmarks
branch set or show the current branch name
branches list repository named branches
bundle create a bundle file
cat output the current or given revision of files
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
config show combined config settings from all hgrc files
copy mark files as copied for the next commit
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
files list tracked files
forget forget the specified files on the next commit
graft copy changes from other branches onto the current branch
grep search revision history for a pattern in specified files
heads show branch heads
help show help for a given topic or a help overview
hint acknowledge hints
identify identify the working directory or specified revision
import import an ordered set of patches
incoming show new changesets found in source
init create a new repository in the given directory
log show revision history of entire repository or files
manifest output the current or given revision of the project manifest
merge merge another revision into working directory
outgoing show changesets not found in the destination
paths show aliases for remote repositories
phase set or show the current phase name
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
recover roll back an interrupted transaction
remove remove the specified files on the next commit
rename rename files; equivalent of copy + remove
resolve redo merges or set/view the merge status of files
revert restore files to their checkout state
root print the root (top) of the current working directory
serve start stand-alone webserver
Commit changes and modify commits:
commit commit the specified files or all outstanding changes
Look at commits and commit history:
diff diff repository (or selected files)
log show revision history of entire repository or files
show show revision in detail
status show changed files in the working directory
summary summarize working directory state
tag add one or more tags for the current or given revision
tags list repository tags
unbundle apply one or more bundle files
Checkout other commits:
update update working directory (or switch revisions)
verify verify the integrity of the repository
version output version and copyright information
enabled extensions:
Rearrange commits:
conflictinfo
debugshell a python shell with repo, changelog & manifest objects
errorredirect
redirect error message
githelp try mapping git commands to Mercurial commands
mergedriver custom merge drivers for autoresolved files
progressfile allows users to have JSON progress bar information written to a
path
simplecache
graft copy changes from other branches onto the current branch
additional help topics:
Exchange commits with a server:
bundlespec Bundle File Formats
color Colorizing Outputs
config Configuration Files
dates Date Formats
diffs Diff Formats
environment Environment Variables
extensions Using Additional Features
filesets Specifying File Sets
flags Command-line flags
glossary Glossary
hgignore Syntax for Mercurial Ignore Files
hgweb Configuring hgweb
internals Technical implementation topics
merge-tools Merge Tools
pager Pager Support
patterns File Name Patterns
phases Working with Phases
revisions Specifying Revisions
scripting Using Mercurial from scripts and automation
subrepos Subrepositories
templating Template Usage
urls URL Paths
pull pull changes from the specified source
push push changes to the specified destination
(use 'hg help -v' to show built-in aliases and global options)
Additional help topics:
glossary glossary
patterns file name patterns
revisions specifying revisions
templating template usage
$ hg --help
Mercurial Distributed SCM
list of commands:
hg COMMAND [OPTIONS]
These are some common Mercurial commands. Use 'hg help commands' to list all
commands, and 'hg help COMMAND' to get help on a specific command.
Create repositories:
clone make a copy of an existing repository
init create a new repository in the given directory
Examine files in your current checkout:
grep search revision history for a pattern in specified files
status show changed files in the working directory
Work on your current checkout:
add add the specified files on the next commit
addremove add all new files, delete all missing files
annotate show changeset information by line for each file
archive create an unversioned archive of a repository revision
backout reverse effect of earlier changeset
bisect subdivision search of changesets
bookmarks create a new bookmark or list existing bookmarks
branch set or show the current branch name
branches list repository named branches
bundle create a bundle file
cat output the current or given revision of files
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
config show combined config settings from all hgrc files
copy mark files as copied for the next commit
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
files list tracked files
forget forget the specified files on the next commit
graft copy changes from other branches onto the current branch
grep search revision history for a pattern in specified files
heads show branch heads
help show help for a given topic or a help overview
hint acknowledge hints
identify identify the working directory or specified revision
import import an ordered set of patches
incoming show new changesets found in source
init create a new repository in the given directory
log show revision history of entire repository or files
manifest output the current or given revision of the project manifest
merge merge another revision into working directory
outgoing show changesets not found in the destination
paths show aliases for remote repositories
phase set or show the current phase name
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
recover roll back an interrupted transaction
remove remove the specified files on the next commit
rename rename files; equivalent of copy + remove
resolve redo merges or set/view the merge status of files
revert restore files to their checkout state
root print the root (top) of the current working directory
serve start stand-alone webserver
Commit changes and modify commits:
commit commit the specified files or all outstanding changes
Look at commits and commit history:
diff diff repository (or selected files)
log show revision history of entire repository or files
show show revision in detail
status show changed files in the working directory
summary summarize working directory state
tag add one or more tags for the current or given revision
tags list repository tags
unbundle apply one or more bundle files
Checkout other commits:
update update working directory (or switch revisions)
verify verify the integrity of the repository
version output version and copyright information
enabled extensions:
Rearrange commits:
conflictinfo
debugshell a python shell with repo, changelog & manifest objects
errorredirect
redirect error message
githelp try mapping git commands to Mercurial commands
mergedriver custom merge drivers for autoresolved files
progressfile allows users to have JSON progress bar information written to a
path
simplecache
graft copy changes from other branches onto the current branch
additional help topics:
Exchange commits with a server:
bundlespec Bundle File Formats
color Colorizing Outputs
config Configuration Files
dates Date Formats
diffs Diff Formats
environment Environment Variables
extensions Using Additional Features
filesets Specifying File Sets
flags Command-line flags
glossary Glossary
hgignore Syntax for Mercurial Ignore Files
hgweb Configuring hgweb
internals Technical implementation topics
merge-tools Merge Tools
pager Pager Support
patterns File Name Patterns
phases Working with Phases
revisions Specifying Revisions
scripting Using Mercurial from scripts and automation
subrepos Subrepositories
templating Template Usage
urls URL Paths
pull pull changes from the specified source
push push changes to the specified destination
(use 'hg help -v' to show built-in aliases and global options)
Additional help topics:
glossary glossary
patterns file name patterns
revisions specifying revisions
templating template usage
Not tested: --debugger

View File

@ -5,242 +5,222 @@ Short help:
$ hg
Mercurial Distributed SCM
basic commands:
hg COMMAND [OPTIONS]
These are some common Mercurial commands. Use 'hg help commands' to list all
commands, and 'hg help COMMAND' to get help on a specific command.
Create repositories:
clone make a copy of an existing repository
init create a new repository in the given directory
Examine files in your current checkout:
grep search revision history for a pattern in specified files
status show changed files in the working directory
Work on your current checkout:
add add the specified files on the next commit
annotate show changeset information by line for each file
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
githelp suggests the Mercurial equivalent of the given git command
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge another revision into working directory
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
copy mark files as copied for the next commit
remove remove the specified files on the next commit
serve start stand-alone webserver
rename rename files; equivalent of copy + remove
Commit changes and modify commits:
commit commit the specified files or all outstanding changes
Look at commits and commit history:
diff diff repository (or selected files)
log show revision history of entire repository or files
show show revision in detail
status show changed files in the working directory
summary summarize working directory state
Checkout other commits:
update update working directory (or switch revisions)
(use 'hg help' for the full list of commands or 'hg -v' for details)
Rearrange commits:
graft copy changes from other branches onto the current branch
Exchange commits with a server:
pull pull changes from the specified source
push push changes to the specified destination
Additional help topics:
glossary glossary
patterns file name patterns
revisions specifying revisions
templating template usage
$ hg -q
add add the specified files on the next commit
annotate show changeset information by line for each file
Mercurial Distributed SCM
hg COMMAND [OPTIONS]
These are some common Mercurial commands. Use 'hg help commands' to list all
commands, and 'hg help COMMAND' to get help on a specific command.
Create repositories:
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
githelp suggests the Mercurial equivalent of the given git command
init create a new repository in the given directory
Examine files in your current checkout:
grep search revision history for a pattern in specified files
status show changed files in the working directory
Work on your current checkout:
add add the specified files on the next commit
copy mark files as copied for the next commit
remove remove the specified files on the next commit
rename rename files; equivalent of copy + remove
Commit changes and modify commits:
commit commit the specified files or all outstanding changes
Look at commits and commit history:
diff diff repository (or selected files)
log show revision history of entire repository or files
merge merge another revision into working directory
show show revision in detail
Checkout other commits:
update update working directory (or switch revisions)
Rearrange commits:
graft copy changes from other branches onto the current branch
Exchange commits with a server:
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
remove remove the specified files on the next commit
serve start stand-alone webserver
show show revision in detail
status show changed files in the working directory
summary summarize working directory state
update update working directory (or switch revisions)
Additional help topics:
glossary glossary
patterns file name patterns
revisions specifying revisions
templating template usage
$ hg help
Mercurial Distributed SCM
list of commands:
hg COMMAND [OPTIONS]
These are some common Mercurial commands. Use 'hg help commands' to list all
commands, and 'hg help COMMAND' to get help on a specific command.
Create repositories:
clone make a copy of an existing repository
init create a new repository in the given directory
Examine files in your current checkout:
grep search revision history for a pattern in specified files
status show changed files in the working directory
Work on your current checkout:
add add the specified files on the next commit
addremove add all new files, delete all missing files
annotate show changeset information by line for each file
archive create an unversioned archive of a repository revision
backout reverse effect of earlier changeset
bisect subdivision search of changesets
bookmarks create a new bookmark or list existing bookmarks
branch set or show the current branch name
branches list repository named branches
bundle create a bundle file
cat output the current or given revision of files
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
config show combined config settings from all hgrc files
copy mark files as copied for the next commit
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
files list tracked files
forget forget the specified files on the next commit
graft copy changes from other branches onto the current branch
grep search revision history for a pattern in specified files
heads show branch heads
help show help for a given topic or a help overview
hint acknowledge hints
identify identify the working directory or specified revision
import import an ordered set of patches
incoming show new changesets found in source
init create a new repository in the given directory
log show revision history of entire repository or files
manifest output the current or given revision of the project manifest
merge merge another revision into working directory
outgoing show changesets not found in the destination
paths show aliases for remote repositories
phase set or show the current phase name
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
recover roll back an interrupted transaction
remove remove the specified files on the next commit
rename rename files; equivalent of copy + remove
resolve redo merges or set/view the merge status of files
revert restore files to their checkout state
root print the root (top) of the current working directory
serve start stand-alone webserver
Commit changes and modify commits:
commit commit the specified files or all outstanding changes
Look at commits and commit history:
diff diff repository (or selected files)
log show revision history of entire repository or files
show show revision in detail
status show changed files in the working directory
summary summarize working directory state
tag add one or more tags for the current or given revision
tags list repository tags
unbundle apply one or more bundle files
Checkout other commits:
update update working directory (or switch revisions)
verify verify the integrity of the repository
version output version and copyright information
enabled extensions:
Rearrange commits:
conflictinfo
debugshell a python shell with repo, changelog & manifest objects
errorredirect
redirect error message
githelp try mapping git commands to Mercurial commands
mergedriver custom merge drivers for autoresolved files
progressfile allows users to have JSON progress bar information written to a
path
simplecache
graft copy changes from other branches onto the current branch
additional help topics:
Exchange commits with a server:
bundlespec Bundle File Formats
color Colorizing Outputs
config Configuration Files
dates Date Formats
diffs Diff Formats
environment Environment Variables
extensions Using Additional Features
filesets Specifying File Sets
flags Command-line flags
glossary Glossary
hgignore Syntax for Mercurial Ignore Files
hgweb Configuring hgweb
internals Technical implementation topics
merge-tools Merge Tools
pager Pager Support
patterns File Name Patterns
phases Working with Phases
revisions Specifying Revisions
scripting Using Mercurial from scripts and automation
subrepos Subrepositories
templating Template Usage
urls URL Paths
pull pull changes from the specified source
push push changes to the specified destination
(use 'hg help -v' to show built-in aliases and global options)
Additional help topics:
glossary glossary
patterns file name patterns
revisions specifying revisions
templating template usage
$ hg -q help
add add the specified files on the next commit
addremove add all new files, delete all missing files
annotate show changeset information by line for each file
archive create an unversioned archive of a repository revision
backout reverse effect of earlier changeset
bisect subdivision search of changesets
bookmarks create a new bookmark or list existing bookmarks
branch set or show the current branch name
branches list repository named branches
bundle create a bundle file
cat output the current or given revision of files
Mercurial Distributed SCM
hg COMMAND [OPTIONS]
These are some common Mercurial commands. Use 'hg help commands' to list all
commands, and 'hg help COMMAND' to get help on a specific command.
Create repositories:
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
config show combined config settings from all hgrc files
copy mark files as copied for the next commit
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
files list tracked files
forget forget the specified files on the next commit
graft copy changes from other branches onto the current branch
grep search revision history for a pattern in specified files
heads show branch heads
help show help for a given topic or a help overview
hint acknowledge hints
identify identify the working directory or specified revision
import import an ordered set of patches
incoming show new changesets found in source
init create a new repository in the given directory
log show revision history of entire repository or files
manifest output the current or given revision of the project manifest
merge merge another revision into working directory
outgoing show changesets not found in the destination
paths show aliases for remote repositories
phase set or show the current phase name
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
recover roll back an interrupted transaction
Examine files in your current checkout:
grep search revision history for a pattern in specified files
status show changed files in the working directory
Work on your current checkout:
add add the specified files on the next commit
copy mark files as copied for the next commit
remove remove the specified files on the next commit
rename rename files; equivalent of copy + remove
resolve redo merges or set/view the merge status of files
revert restore files to their checkout state
root print the root (top) of the current working directory
serve start stand-alone webserver
Commit changes and modify commits:
commit commit the specified files or all outstanding changes
Look at commits and commit history:
diff diff repository (or selected files)
log show revision history of entire repository or files
show show revision in detail
status show changed files in the working directory
summary summarize working directory state
tag add one or more tags for the current or given revision
tags list repository tags
unbundle apply one or more bundle files
Checkout other commits:
update update working directory (or switch revisions)
verify verify the integrity of the repository
version output version and copyright information
enabled extensions:
Rearrange commits:
conflictinfo
debugshell a python shell with repo, changelog & manifest objects
errorredirect
redirect error message
githelp try mapping git commands to Mercurial commands
mergedriver custom merge drivers for autoresolved files
progressfile allows users to have JSON progress bar information written to a
path
simplecache
graft copy changes from other branches onto the current branch
additional help topics:
Exchange commits with a server:
bundlespec Bundle File Formats
color Colorizing Outputs
config Configuration Files
dates Date Formats
diffs Diff Formats
environment Environment Variables
extensions Using Additional Features
filesets Specifying File Sets
flags Command-line flags
glossary Glossary
hgignore Syntax for Mercurial Ignore Files
hgweb Configuring hgweb
internals Technical implementation topics
merge-tools Merge Tools
pager Pager Support
patterns File Name Patterns
phases Working with Phases
revisions Specifying Revisions
scripting Using Mercurial from scripts and automation
subrepos Subrepositories
templating Template Usage
urls URL Paths
pull pull changes from the specified source
push push changes to the specified destination
Additional help topics:
glossary glossary
patterns file name patterns
revisions specifying revisions
templating template usage
Test extension help:
$ hg help extensions --config extensions.rebase= --config extensions.children=
@ -281,11 +261,12 @@ Test extension help:
# ditto, but no path was supplied for extension baz
baz = !
enabled extensions:
Enabled extensions:
children command to display child changesets (DEPRECATED)
conflictinfo
debugshell a python shell with repo, changelog & manifest objects
eden accelerated hg functionality in Eden checkouts (eden !)
errorredirect
redirect error message
githelp try mapping git commands to Mercurial commands
@ -295,7 +276,7 @@ Test extension help:
rebase command to move sets of revisions to a different ancestor
simplecache
disabled extensions:
Disabled extensions:
absorb apply working directory changes to changesets
eden accelerated hg functionality in Eden checkouts (eden !)
@ -425,64 +406,7 @@ Verify that extension keywords appear in help templates
$ hg help --config extensions.transplant= templating|grep transplant > /dev/null
Test short command list with verbose option
$ hg -v help shortlist
Mercurial Distributed SCM
basic commands:
add add the specified files on the next commit
annotate, blame
show changeset information by line for each file
clone make a copy of an existing repository
commit, ci commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
githelp, git suggests the Mercurial equivalent of the given git command
init create a new repository in the given directory
log, history show revision history of entire repository or files
merge merge another revision into working directory
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
remove, rm remove the specified files on the next commit
serve start stand-alone webserver
show show revision in detail
status, st show changed files in the working directory
summary, sum summarize working directory state
update, up, checkout, co
update working directory (or switch revisions)
global options ([+] can be repeated):
-R --repository REPO repository root directory or name of overlay bundle
file
--cwd DIR change working directory
-y --noninteractive do not prompt, automatically pick the first choice
for all prompts
-q --quiet suppress output
-v --verbose enable additional output
--color TYPE when to colorize (boolean, always, auto, never, or
debug)
--config CONFIG [+] set/override config option (use
'section.name=value')
--configfile FILE [+] enables the given config file
--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
--hidden consider hidden changesets
--pager TYPE when to paginate (boolean, always, auto, or never)
(default: auto)
(use 'hg help' for the full list of commands)
Normal help for add
$ hg add -h
hg add [OPTION]... [FILE]...
@ -499,7 +423,7 @@ Test short command list with verbose option
Returns 0 if all files are successfully added.
options ([+] can be repeated):
Options ([+] can be repeated):
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
@ -550,14 +474,14 @@ Verbose help for add
Returns 0 if all files are successfully added.
options ([+] can be repeated):
Options ([+] can be repeated):
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
-S --subrepos recurse into subrepositories
-n --dry-run do not perform actions, just print output
global options ([+] can be repeated):
Global options ([+] can be repeated):
-R --repository REPO repository root directory or name of overlay bundle
file
@ -616,7 +540,7 @@ Test help option with version option
add the specified files on the next commit
options ([+] can be repeated):
Options ([+] can be repeated):
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
@ -629,12 +553,10 @@ Test help option with version option
Test ambiguous command help
$ hg help ad
list of commands:
Commands:
add add the specified files on the next commit
addremove add all new files, delete all missing files
(use 'hg help -v ad' to show built-in aliases and global options)
Test command without options
@ -661,7 +583,7 @@ Test command without options
[verify]
skipmanifests = true
options ([+] can be repeated):
Options ([+] can be repeated):
-r --rev REV [+] verify the specified revision or revset
@ -698,7 +620,7 @@ Test command without options
Returns 0 on success.
options ([+] can be repeated):
Options ([+] can be repeated):
-r --rev REV [+] revision
-c --change REV change made by revision
@ -764,7 +686,7 @@ Test command without options
Returns 0 on success.
options ([+] can be repeated):
Options ([+] can be repeated):
-A --all show status of all files
-m --modified show only modified files
@ -799,30 +721,57 @@ Test command without options
hg: unknown command 'skjdfks'
Mercurial Distributed SCM
basic commands:
hg COMMAND [OPTIONS]
These are some common Mercurial commands. Use 'hg help commands' to list all
commands, and 'hg help COMMAND' to get help on a specific command.
Create repositories:
clone make a copy of an existing repository
init create a new repository in the given directory
Examine files in your current checkout:
grep search revision history for a pattern in specified files
status show changed files in the working directory
Work on your current checkout:
add add the specified files on the next commit
annotate show changeset information by line for each file
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
githelp suggests the Mercurial equivalent of the given git command
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge another revision into working directory
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
copy mark files as copied for the next commit
remove remove the specified files on the next commit
serve start stand-alone webserver
rename rename files; equivalent of copy + remove
Commit changes and modify commits:
commit commit the specified files or all outstanding changes
Look at commits and commit history:
diff diff repository (or selected files)
log show revision history of entire repository or files
show show revision in detail
status show changed files in the working directory
summary summarize working directory state
Checkout other commits:
update update working directory (or switch revisions)
(use 'hg help' for the full list of commands or 'hg -v' for details)
Rearrange commits:
graft copy changes from other branches onto the current branch
Exchange commits with a server:
pull pull changes from the specified source
push push changes to the specified destination
Additional help topics:
glossary glossary
patterns file name patterns
revisions specifying revisions
templating template usage
[255]
Typoed command gives suggestion
@ -915,7 +864,7 @@ Test for aliases
defined by: helpext
options:
Options:
--remote check for push and pull
@ -939,7 +888,7 @@ Test command with no help text
(no help text available)
options:
Options:
--longdesc VALUE xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (default: 3)
@ -972,107 +921,63 @@ Test that default list of commands omits extension commands
$ hg help
Mercurial Distributed SCM
list of commands:
hg COMMAND [OPTIONS]
These are some common Mercurial commands. Use 'hg help commands' to list all
commands, and 'hg help COMMAND' to get help on a specific command.
Create repositories:
clone make a copy of an existing repository
init create a new repository in the given directory
Examine files in your current checkout:
grep search revision history for a pattern in specified files
status show changed files in the working directory
Work on your current checkout:
add add the specified files on the next commit
addremove add all new files, delete all missing files
annotate show changeset information by line for each file
archive create an unversioned archive of a repository revision
backout reverse effect of earlier changeset
bisect subdivision search of changesets
bookmarks create a new bookmark or list existing bookmarks
branch set or show the current branch name
branches list repository named branches
bundle create a bundle file
cat output the current or given revision of files
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
config show combined config settings from all hgrc files
copy mark files as copied for the next commit
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
files list tracked files
forget forget the specified files on the next commit
graft copy changes from other branches onto the current branch
grep search revision history for a pattern in specified files
heads show branch heads
help show help for a given topic or a help overview
hint acknowledge hints
identify identify the working directory or specified revision
import import an ordered set of patches
incoming show new changesets found in source
init create a new repository in the given directory
log show revision history of entire repository or files
manifest output the current or given revision of the project manifest
merge merge another revision into working directory
outgoing show changesets not found in the destination
paths show aliases for remote repositories
phase set or show the current phase name
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
recover roll back an interrupted transaction
remove remove the specified files on the next commit
rename rename files; equivalent of copy + remove
resolve redo merges or set/view the merge status of files
revert restore files to their checkout state
root print the root (top) of the current working directory
serve start stand-alone webserver
Commit changes and modify commits:
commit commit the specified files or all outstanding changes
Look at commits and commit history:
diff diff repository (or selected files)
log show revision history of entire repository or files
show show revision in detail
status show changed files in the working directory
summary summarize working directory state
tag add one or more tags for the current or given revision
tags list repository tags
unbundle apply one or more bundle files
Checkout other commits:
update update working directory (or switch revisions)
verify verify the integrity of the repository
version output version and copyright information
enabled extensions:
Rearrange commits:
conflictinfo
debugshell a python shell with repo, changelog & manifest objects
errorredirect
redirect error message
githelp try mapping git commands to Mercurial commands
helpext (no help text available)
mergedriver custom merge drivers for autoresolved files
progressfile allows users to have JSON progress bar information written to a
path
simplecache
graft copy changes from other branches onto the current branch
additional help topics:
Exchange commits with a server:
bundlespec Bundle File Formats
color Colorizing Outputs
config Configuration Files
dates Date Formats
diffs Diff Formats
environment Environment Variables
extensions Using Additional Features
filesets Specifying File Sets
flags Command-line flags
glossary Glossary
hgignore Syntax for Mercurial Ignore Files
hgweb Configuring hgweb
internals Technical implementation topics
merge-tools Merge Tools
pager Pager Support
patterns File Name Patterns
phases Working with Phases
revisions Specifying Revisions
scripting Using Mercurial from scripts and automation
subrepos Subrepositories
templating Template Usage
urls URL Paths
pull pull changes from the specified source
push push changes to the specified destination
(use 'hg help -v' to show built-in aliases and global options)
Additional help topics:
glossary glossary
patterns file name patterns
revisions specifying revisions
templating template usage
Test list of internal help commands
$ hg help debug
debug commands (internal and unsupported):
Debug commands (internal and unsupported):
debugancestor
find the ancestor revision of two revisions in a given index
@ -1139,6 +1044,7 @@ Test list of internal help commands
debugprocesstree
show process tree related to hg
debugprogress
(no help text available)
debugpushkey access the pushkey key/value protocol
debugpvec (no help text available)
debugrebuilddirstate
@ -1167,8 +1073,6 @@ Test list of internal help commands
debugwalk show how files match on given patterns
debugwireargs
(no help text available)
(use 'hg help -v debug' to show built-in aliases and global options)
internals topic renders index of available sub-topics
@ -1387,11 +1291,9 @@ Test list of commands with command with no help text
$ hg help helpext
helpext extension - no help text available
list of commands:
Commands:
nohelp (no help text available)
(use 'hg help -v helpext' to show built-in aliases and global options)
test advanced, deprecated and experimental options are hidden in command help
@ -2832,7 +2734,7 @@ Dish up an empty repo; serve it cold.
Returns 0 if all files are successfully added.
</p>
<p>
options ([+] can be repeated):
Options ([+] can be repeated):
</p>
<table>
<tr><td>-I</td>
@ -2849,7 +2751,7 @@ Dish up an empty repo; serve it cold.
<td>do not perform actions, just print output</td></tr>
</table>
<p>
global options ([+] can be repeated):
Global options ([+] can be repeated):
</p>
<table>
<tr><td>-R</td>
@ -3033,7 +2935,7 @@ Dish up an empty repo; serve it cold.
Returns 0 on success, 1 if any warnings encountered.
</p>
<p>
options ([+] can be repeated):
Options ([+] can be repeated):
</p>
<table>
<tr><td>-A</td>
@ -3053,7 +2955,7 @@ Dish up an empty repo; serve it cold.
<td>exclude names matching the given patterns</td></tr>
</table>
<p>
global options ([+] can be repeated):
Global options ([+] can be repeated):
</p>
<table>
<tr><td>-R</td>

View File

@ -1,15 +0,0 @@
Tests that the various help files are properly registered
Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ hg help | grep 'git'
githelp try mapping git commands to Mercurial commands
hggit push and pull from a Git server
git Working with Git Repositories
Mercurial 3.7+ uses single quotes
$ hg help hggit | grep 'help git'
For more information and instructions, see 'hg help git'
$ hg help git | grep 'Working with Git Repositories'
Working with Git Repositories

View File

@ -40,7 +40,7 @@ Record help
This command is not available when committing a merge.
options ([+] can be repeated):
Options ([+] can be repeated):
-A --addremove mark new/missing files as added/removed before
committing

View File

@ -447,7 +447,7 @@ Confirm that --help works (it didn't when we used an alias)
See 'hg help templates' for more about pre-packaged styles and specifying
custom templates.
options ([+] can be repeated):
Options ([+] can be repeated):
--nodates omit dates from diff headers (but keeps it in commit
header)
@ -477,7 +477,7 @@ Confirm that --help works (it didn't when we used an alias)
See 'hg help templates' for more about pre-packaged styles and specifying
custom templates.
options ([+] can be repeated):
Options ([+] can be repeated):
--nodates omit dates from diff headers (but keeps it in commit
header)
@ -495,7 +495,7 @@ Confirm that --help works (it didn't when we used an alias)
-I --include PATTERN [+] include names matching the given patterns
-X --exclude PATTERN [+] exclude names matching the given patterns
global options ([+] can be repeated):
Global options ([+] can be repeated):
-R --repository REPO repository root directory or name of overlay bundle
* (glob)

View File

@ -17,30 +17,57 @@
hg: unknown command 'an'
Mercurial Distributed SCM
basic commands:
hg COMMAND [OPTIONS]
These are some common Mercurial commands. Use 'hg help commands' to list all
commands, and 'hg help COMMAND' to get help on a specific command.
Create repositories:
clone make a copy of an existing repository
init create a new repository in the given directory
Examine files in your current checkout:
grep search revision history for a pattern in specified files
status show changed files in the working directory
Work on your current checkout:
add add the specified files on the next commit
annotate show changeset information by line for each file
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
githelp suggests the Mercurial equivalent of the given git command
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge another revision into working directory
pull pull changes from the specified source
push push changes to the specified destination
record interactively select changes to commit
copy mark files as copied for the next commit
remove remove the specified files on the next commit
serve start stand-alone webserver
rename rename files; equivalent of copy + remove
Commit changes and modify commits:
commit commit the specified files or all outstanding changes
Look at commits and commit history:
diff diff repository (or selected files)
log show revision history of entire repository or files
show show revision in detail
status show changed files in the working directory
summary summarize working directory state
Checkout other commits:
update update working directory (or switch revisions)
(use 'hg help' for the full list of commands or 'hg -v' for details)
Rearrange commits:
graft copy changes from other branches onto the current branch
Exchange commits with a server:
pull pull changes from the specified source
push push changes to the specified destination
Additional help topics:
glossary glossary
patterns file name patterns
revisions specifying revisions
templating template usage
[255]
$ hg annotate a
0: a

View File

@ -604,7 +604,7 @@ Make sure no one adds back a -b option:
(use 'hg help -e strip' to show help for the strip extension)
options ([+] can be repeated):
Options ([+] can be repeated):
-r --rev REV [+] strip specified revision (optional, can specify
revisions without this option)

View File

@ -205,7 +205,7 @@
second test subcommand
global options ([+] can be repeated):
Global options ([+] can be repeated):
-R --repository REPO repository root directory or name of overlay bundle
file
@ -240,7 +240,7 @@
other test command
global options ([+] can be repeated):
Global options ([+] can be repeated):
-R --repository REPO repository root directory or name of overlay bundle
file

View File

@ -28,7 +28,7 @@ Help for uncommit
(use 'hg help -e uncommit' to show help for the uncommit extension)
options ([+] can be repeated):
Options ([+] can be repeated):
--keep allow an empty commit after uncommiting
-I --include PATTERN [+] include names matching the given patterns