mercurial/commands.py
changeset 25684 0f894d2203c8
parent 25683 3b1fc40626d8
child 25694 5ede49f4383a
--- a/mercurial/commands.py	Sun Jun 28 18:39:58 2015 -0400
+++ b/mercurial/commands.py	Sun Jun 28 13:22:17 2015 -0400
@@ -4069,6 +4069,10 @@
         if ctx.rev() is None:
             ctx = repo[None]
             parents = ctx.parents()
+            taglist = []
+            for p in parents:
+                taglist.extend(p.tags())
+
             changed = ""
             if default or id or num:
                 if (any(repo.status())
@@ -4085,6 +4089,7 @@
                 output = [hexfunc(ctx.node())]
             if num:
                 output.append(str(ctx.rev()))
+            taglist = ctx.tags()
 
         if default and not ui.quiet:
             b = ctx.branch()
@@ -4092,7 +4097,7 @@
                 output.append("(%s)" % b)
 
             # multiple tags for a single parent separated by '/'
-            t = '/'.join(ctx.tags())
+            t = '/'.join(taglist)
             if t:
                 output.append(t)
 
@@ -4105,7 +4110,7 @@
                 output.append(ctx.branch())
 
             if tags:
-                output.extend(ctx.tags())
+                output.extend(taglist)
 
             if bookmarks:
                 output.extend(ctx.bookmarks())