Patchwork [3,of,6] rebase: move dest check down below other flag parsings

login
register
mail settings
Submitter Ryan McElroy
Date March 28, 2017, 9:31 p.m.
Message ID <409a87200f6b079c9bfe.1490736672@devbig314.prn1.facebook.com>
Download mbox | patch
Permalink /patch/19799/
State Changes Requested
Headers show

Comments

Ryan McElroy - March 28, 2017, 9:31 p.m.
# HG changeset patch
# User Ryan McElroy <rmcelroy@fb.com>
# Date 1490736312 25200
#      Tue Mar 28 14:25:12 2017 -0700
# Node ID 409a87200f6b079c9bfe1e85fd0715822346c402
# Parent  976b28021f29ad7686ea57fb0fdff4bd17798a71
rebase: move dest check down below other flag parsings

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -685,12 +685,6 @@  def rebase(ui, repo, **opts):
 
         # 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', [])
@@ -710,6 +704,11 @@  def rebase(ui, repo, **opts):
                     "'histedit' extension (see \"%s\")") % help
             raise error.Abort(msg)
 
+        if ui.configbool('commands', 'rebase.requiredest'):
+            if not destf:
+                raise error.Abort(_('you must specify a destination'),
+                                  hint=_('use: hg rebase -d REV'))
+
         if rbsrt.collapsemsg and not rbsrt.collapsef:
             raise error.Abort(
                 _('message can only be specified with collapse'))