mercurial/commands.py
changeset 22639 79c4178b2169
parent 22634 e48a5d3996c2
child 22641 ffd0f6b1c29d
--- a/mercurial/commands.py	Sun Sep 28 16:57:47 2014 +0200
+++ b/mercurial/commands.py	Thu Oct 02 21:58:10 2014 +0900
@@ -1104,28 +1104,29 @@
                   reverse=True)
 
     for tag, ctx, isactive, isopen in branches:
-        if (not active) or isactive:
-            if isactive:
-                label = 'branches.active'
-                notice = ''
-            elif not isopen:
-                if not closed:
-                    continue
-                label = 'branches.closed'
-                notice = _(' (closed)')
-            else:
-                label = 'branches.inactive'
-                notice = _(' (inactive)')
-            if tag == repo.dirstate.branch():
-                label = 'branches.current'
-            rev = str(ctx.rev()).rjust(31 - encoding.colwidth(tag))
-            rev = ui.label('%s:%s' % (rev, hexfunc(ctx.node())),
-                           'log.changeset changeset.%s' % ctx.phasestr())
-            labeledtag = ui.label(tag, label)
-            if ui.quiet:
-                ui.write("%s\n" % labeledtag)
-            else:
-                ui.write("%s %s%s\n" % (labeledtag, rev, notice))
+        if active and not isactive:
+            continue
+        if isactive:
+            label = 'branches.active'
+            notice = ''
+        elif not isopen:
+            if not closed:
+                continue
+            label = 'branches.closed'
+            notice = _(' (closed)')
+        else:
+            label = 'branches.inactive'
+            notice = _(' (inactive)')
+        if tag == repo.dirstate.branch():
+            label = 'branches.current'
+        rev = str(ctx.rev()).rjust(31 - encoding.colwidth(tag))
+        rev = ui.label('%s:%s' % (rev, hexfunc(ctx.node())),
+                       'log.changeset changeset.%s' % ctx.phasestr())
+        labeledtag = ui.label(tag, label)
+        if ui.quiet:
+            ui.write("%s\n" % labeledtag)
+        else:
+            ui.write("%s %s%s\n" % (labeledtag, rev, notice))
 
 @command('bundle',
     [('f', 'force', None, _('run even when the destination is unrelated')),