rebase: don't use util.Abort for an internal error
authorMartin Geisler <mg@lazybytes.net>
Sun, 13 Mar 2011 13:52:47 +0100
changeset 13609 e035356dbfdc
parent 13608 63ab6b0ccedc
child 13611 358924b0abce
rebase: don't use util.Abort for an internal error
hgext/rebase.py
--- a/hgext/rebase.py	Sun Mar 13 13:38:44 2011 +0100
+++ b/hgext/rebase.py	Sun Mar 13 13:52:47 2011 +0100
@@ -90,7 +90,7 @@
         contf = opts.get('continue')
         abortf = opts.get('abort')
         collapsef = opts.get('collapse', False)
-        extrafn = opts.get('extrafn')
+        extrafn = opts.get('extrafn') # internal, used by e.g. hgsubversion
         keepf = opts.get('keep', False)
         keepbranchesf = opts.get('keepbranches', False)
         detachf = opts.get('detach', False)
@@ -138,8 +138,7 @@
                     external = checkexternal(repo, state, targetancestors)
 
         if keepbranchesf:
-            if extrafn:
-                raise util.Abort(_('cannot use both keepbranches and extrafn'))
+            assert not extrafn, 'cannot use both keepbranches and extrafn'
             def extrafn(ctx, extra):
                 extra['branch'] = ctx.branch()