changeset 27261:986d04b9fedd

rebase: remove extra "if" from check of collapsing named branches
author Yuya Nishihara <yuya@tcha.org>
date Sat, 05 Dec 2015 23:50:13 +0900
parents d755a9531fce
children 3d0feb2f978b
files hgext/rebase.py
diffstat 1 files changed, 7 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Sat Dec 05 23:48:22 2015 +0900
+++ b/hgext/rebase.py	Sat Dec 05 23:50:13 2015 +0900
@@ -386,14 +386,13 @@
             if dest.closesbranch() and not keepbranchesf:
                 ui.status(_('reopening closed branch head %s\n') % dest)
 
-        if keepbranchesf:
-            if collapsef:
-                branches = set()
-                for rev in state:
-                    branches.add(repo[rev].branch())
-                    if len(branches) > 1:
-                        raise error.Abort(_('cannot collapse multiple named '
-                            'branches'))
+        if keepbranchesf and collapsef:
+            branches = set()
+            for rev in state:
+                branches.add(repo[rev].branch())
+                if len(branches) > 1:
+                    raise error.Abort(_('cannot collapse multiple named '
+                                        'branches'))
 
         # Rebase
         if not targetancestors: