hgext/rebase.py
branchstable
changeset 27975 6f92d6bd2972
parent 27963 07a5de79ec30
child 27976 8f4d3eeb5198
--- a/hgext/rebase.py	Wed Feb 03 09:06:52 2016 -0800
+++ b/hgext/rebase.py	Wed Feb 03 09:23:52 2016 -0800
@@ -397,13 +397,14 @@
             if dest.closesbranch() and not keepbranchesf:
                 ui.status(_('reopening closed branch head %s\n') % dest)
 
-        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'))
+        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'))
 
         # Rebase
         if not targetancestors: