From 922824bfe1fa998325850c4420ff5c68fe18566d Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Fri, 1 Oct 2010 23:16:11 +0200 Subject: [PATCH] heads: mention STARTREV in synopsis and help for --rev Before this change, "hg help heads" said hg heads [-ac] [-r REV] [REV]... [...] If STARTREV is specified, only those heads that are descendants of STARTREV will be displayed. [...] -r --rev REV show only heads which are descendants of REV [...] which made little sense since there are two things called REV in the synopsis and nothing called STARTREV. A little digging reveals that the "[-r REV]" part of the synopsis was introduced in 3acdabb0ef1d, changed to "[-r STARTREV]" in 68df96e9e749, and then changed back to "[-r REV]" in 5c78ba00bf0c. The last change seems to be based on a patch[1] on our mailinglist that actually *inserted* STARTREV again in the help for the command line option itself. For some reason, the patch was changed to remove STARTREV from the synopsis. This change finally makes the help consistent by putting STARTREV back into the help in all places where it is needed: hg heads [-ac] [-r STARTREV] [REV]... [...] If STARTREV is specified, only those heads that are descendants of STARTREV will be displayed. [...] -r --rev STARTREV show only heads which are descendants of STARTREV [...] This was not possible until 7ba070acb8f7, which introduced the possibility of naming the meta variables for each option. [1]: http://mercurial.markmail.org/message/qgc55gd4fam4ogvz --- mercurial/commands.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mercurial/commands.py b/mercurial/commands.py index e1a6e1d32e..a4d672e27d 100644 --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4155,14 +4155,15 @@ table = { "heads": (heads, [('r', 'rev', '', - _('show only heads which are descendants of REV'), _('REV')), + _('show only heads which are descendants of STARTREV'), + _('STARTREV')), ('t', 'topo', False, _('show topological heads only')), ('a', 'active', False, _('show active branchheads only (DEPRECATED)')), ('c', 'closed', False, _('show normal and closed branch heads')), ] + templateopts, - _('[-ac] [-r REV] [REV]...')), + _('[-ac] [-r STARTREV] [REV]...')), "help": (help_, [], _('[TOPIC]')), "identify|id": (identify,