Add option -b/--branch to hg tip (as done for hg parents).
--- a/mercurial/commands.py Tue Feb 21 08:11:46 2006 +0100
+++ b/mercurial/commands.py Tue Feb 21 12:59:16 2006 +0100
@@ -2225,7 +2225,10 @@
Show the tip revision.
"""
n = repo.changelog.tip()
- show_changeset(ui, repo, changenode=n)
+ br = None
+ if opts['branch']:
+ br = repo.branchlookup([n])
+ show_changeset(ui, repo, changenode=n, brinfo=br)
if opts['patch']:
dodiff(ui, ui, repo, repo.changelog.parents(n)[0], n)
@@ -2577,7 +2580,11 @@
('r', 'rev', '', _('revision to tag'))],
_('hg tag [-r REV] [OPTION]... NAME')),
"tags": (tags, [], _('hg tags')),
- "tip": (tip, [('p', 'patch', None, _('show patch'))], _('hg tip')),
+ "tip":
+ (tip,
+ [('b', 'branch', None, _('show branches')),
+ ('p', 'patch', None, _('show patch'))],
+ _('hg [-b] [-p] tip')),
"unbundle":
(unbundle,
[('u', 'update', None,