changeset 1725:49004ad10cde

merge with crew
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Wed, 15 Feb 2006 22:37:28 +0100
parents 5a36609f73a7 (diff) fde8fb2cbede (current diff)
children 56fb048b102c
files
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Feb 15 14:22:16 2006 +0100
+++ b/mercurial/commands.py	Wed Feb 15 22:37:28 2006 +0100
@@ -1681,7 +1681,7 @@
             dodiff(ui, ui, repo, prev, n)
             ui.write("\n")
 
-def parents(ui, repo, rev=None):
+def parents(ui, repo, rev=None, branch=None):
     """show the parents of the working dir or revision
 
     Print the working directory's parent revisions.
@@ -1691,9 +1691,12 @@
     else:
         p = repo.dirstate.parents()
 
+    br = None
+    if branch is not None:
+        br = repo.branchlookup(p)
     for n in p:
         if n != nullid:
-            show_changeset(ui, repo, changenode=n)
+            show_changeset(ui, repo, changenode=n, brinfo=br)
 
 def paths(ui, search=None):
     """show definition of symbolic path names
@@ -2412,7 +2415,10 @@
           ('p', 'patch', None, _('show patch')),
           ('n', 'newest-first', None, _('show newest record first'))],
          _('hg outgoing [-p] [-n] [-M] [DEST]')),
-    "^parents": (parents, [], _('hg parents [REV]')),
+    "^parents":
+        (parents,
+         [('b', 'branch', None, _('show branches'))],
+         _('hg parents [-b] [REV]')),
     "paths": (paths, [], _('hg paths [NAME]')),
     "^pull":
         (pull,