diff hgext/rebase.py @ 13609:e035356dbfdc

rebase: don't use util.Abort for an internal error
author Martin Geisler <mg@lazybytes.net>
date Sun, 13 Mar 2011 13:52:47 +0100
parents 6bf39d88c857
children ee349e228835
line wrap: on
line diff
--- 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()