Commit d0295068 authored by Matt Mackall's avatar Matt Mackall

heads: more clarity for --closed

parent 4c287332e03b
......@@ -1381,6 +1381,8 @@ def heads(ui, repo, *branchrevs, **opts):
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 @@ table = {
[('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 @@ table = {
(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]')),
......
......@@ -63,26 +63,7 @@ a branch name much longer than the default justification used by branches 7:10ff
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment