# HG changeset patch # User Matt Mackall # Date 1248305243 18000 # Node ID c2041f80f22ae2336c1bf383d9c14eb9eb9e438a # Parent 4c287332e03bd62a4217a23dd61982ef5db1d20b heads: more clarity for --closed diff -r 4c287332e03b -r c2041f80f22a mercurial/commands.py --- a/mercurial/commands.py Wed Jul 22 18:08:02 2009 -0500 +++ b/mercurial/commands.py Wed Jul 22 18:27:23 2009 -0500 @@ -1381,6 +1381,8 @@ closed = opts.get('closed') hideinactive, _heads = opts.get('active'), None if not branchrevs: + if closed: + raise error.Abort(_('you must specify a branch to use --closed')) # Assume we're looking repo-wide heads if no revs were specified. heads = repo.heads(start) else: @@ -3210,7 +3212,7 @@ [('a', 'active', False, _('show only branches that have unmerged heads')), ('c', 'closed', False, - _('show normal and closed heads'))], + _('show normal and closed branches'))], _('[-a]')), "bundle": (bundle, @@ -3327,9 +3329,9 @@ (heads, [('r', 'rev', '', _('show only heads which are descendants of REV')), ('a', 'active', False, - _('show only the active heads from open branches')), + _('show only the active branch heads from open branches')), ('c', 'closed', False, - _('show normal and closed heads')), + _('show normal and closed branch heads')), ] + templateopts, _('[-r STARTREV] [REV]...')), "help": (help_, [], _('[TOPIC]')), diff -r 4c287332e03b -r c2041f80f22a tests/test-branches.out --- a/tests/test-branches.out Wed Jul 22 18:08:02 2009 -0500 +++ b/tests/test-branches.out Wed Jul 22 18:27:23 2009 -0500 @@ -63,26 +63,7 @@ c 6:589736a22561 (inactive) a 5:d8cbc61dbaa6 (inactive) default 0:19709c5a4e75 (inactive) -changeset: 10:bfbe841b666e -branch: b -tag: tip -user: test -date: Thu Jan 01 00:00:09 1970 +0000 -summary: adding another cset to branch b - -changeset: 8:eebb944467c9 -branch: b -parent: 4:aee39cd168d0 -user: test -date: Thu Jan 01 00:00:07 1970 +0000 -summary: adding cset to branch b - -changeset: 7:10ff5895aa57 -branch: a branch name much longer than the default justification used by branches -user: test -date: Thu Jan 01 00:00:06 1970 +0000 -summary: Adding d branch - +abort: you must specify a branch to use --closed changeset: 10:bfbe841b666e branch: b tag: tip