hgext/rebase.py
branchstable
changeset 14897 b9daa5b7a3af
parent 14884 c0ccd70df52c
child 14917 2957b8b1e809
--- a/hgext/rebase.py	Sat Jul 16 15:24:28 2011 +0300
+++ b/hgext/rebase.py	Mon Jul 18 22:58:21 2011 +0200
@@ -175,6 +175,14 @@
             assert not extrafn, 'cannot use both keepbranches and extrafn'
             def extrafn(ctx, extra):
                 extra['branch'] = ctx.branch()
+            if collapsef:
+                branches = set()
+                for rev in state:
+                    branches.add(repo[rev].branch())
+                    if len(branches) > 1:
+                        raise util.Abort(_('cannot collapse multiple named ' 
+                            'branches'))
+
 
         # Rebase
         if not targetancestors: