hgext/rebase.py
changeset 31736 b5afec71c1f9
parent 31626 b26975483841
child 31738 ae6bab095c66
--- a/hgext/rebase.py	Thu Mar 30 03:50:10 2017 -0700
+++ b/hgext/rebase.py	Thu Mar 30 03:50:10 2017 -0700
@@ -685,12 +685,6 @@
 
         # Validate input and define rebasing points
         destf = opts.get('dest', None)
-
-        if ui.configbool('commands', 'rebase.requiredest'):
-            if not destf:
-                raise error.Abort(_('you must specify a destination'),
-                                  hint=_('use: hg rebase -d REV'))
-
         srcf = opts.get('source', None)
         basef = opts.get('base', None)
         revf = opts.get('rev', [])
@@ -776,6 +770,10 @@
     cmdutil.checkunfinished(repo)
     cmdutil.bailifchanged(repo)
 
+    if ui.configbool('commands', 'rebase.requiredest') and not destf:
+        raise error.Abort(_('you must specify a destination'),
+                          hint=_('use: hg rebase -d REV'))
+
     if destf:
         dest = scmutil.revsingle(repo, destf)