[PATCH] commands: hide closed topological heads if --close is not specified (issue1893)
Henrik Stuart
hg at hstuart.dk
Sat Nov 14 08:27:07 CST 2009
# HG changeset patch
# User Henrik Stuart <hg at hstuart.dk>
# Date 1258208604 -3600
# Node ID c1f46f6e95a054cc42e4c8d0c2a6b0919dadf33f
# Parent ddf2adf88b89572b8780a5223dff2269a3513240
commands: hide closed topological heads if --close is not specified (issue1893)
diff -r ddf2adf88b89 -r c1f46f6e95a0 mercurial/commands.py
--- a/mercurial/commands.py Sat Oct 31 18:17:59 2009 +0100
+++ b/mercurial/commands.py Sat Nov 14 15:23:24 2009 +0100
@@ -1390,10 +1390,10 @@
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)
+ if not closed:
+ heads = [h for h in heads if 'close' not in repo[h].extra()]
else:
if hideinactive:
_heads = repo.heads(start)
More information about the Mercurial-devel
mailing list