# HG changeset patch # User Thomas Arendsen Hein # Date 1140523156 -3600 # Node ID 8eaa8e06a364476e05856035957a74c45c809bd5 # Parent 7eb1934f83fb4b995912c5dc4db9c8d1ede96197 Add option -b/--branch to hg tip (as done for hg parents). diff -r 7eb1934f83fb -r 8eaa8e06a364 mercurial/commands.py --- 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,