Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 1551:e793cbc8be00
Fixes to "hg heads -r FOO":
Make it actually work (undefined variable 'rev'; allow to pass a rev parameter).
repo.branchlookup() doesn't need a copy of heads because it doesn't modify it.
Use None as default argument to heads() instead of nullid.
Doc string PEPification.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 16 Nov 2005 12:56:19 +0100 |
parents | ccb9b62de892 |
children | 7509fa02437f |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Nov 16 12:08:25 2005 +0100 +++ b/mercurial/commands.py Wed Nov 16 12:56:19 2005 +0100 @@ -1287,12 +1287,12 @@ are the usual targets for update and merge operations. """ if opts['rev']: - heads = repo.heads(repo.lookup(rev)) + heads = repo.heads(repo.lookup(opts['rev'])) else: heads = repo.heads() br = None if opts['branches']: - br = repo.branchlookup(list(heads)) + br = repo.branchlookup(heads) for n in heads: show_changeset(ui, repo, changenode=n, brinfo=br) @@ -2241,7 +2241,7 @@ "heads": (heads, [('b', 'branches', None, _('find branch info')), - ('r', 'rev', None, _('show only heads descendants from rev'))], + ('r', 'rev', "", _('show only heads which are descendants of rev'))], _('hg heads [-b] [-r <rev>]')), "help": (help_, [], _('hg help [COMMAND]')), "identify|id": (identify, [], _('hg identify')),