changeset 1762:8eaa8e06a364

Add option -b/--branch to hg tip (as done for hg parents).
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 21 Feb 2006 12:59:16 +0100
parents 7eb1934f83fb
children fa34a74efc40
files mercurial/commands.py
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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,