Patchwork [2,of,2] rebase: don't require destination if commands.rebase.requiredest=False

login
register
mail settings
Submitter via Mercurial-devel
Date March 24, 2017, 11:35 p.m.
Message ID <ccac4af8923796bf53db.1490398508@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/19649/
State Accepted
Headers show

Comments

via Mercurial-devel - March 24, 2017, 11:35 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1490397610 25200
#      Fri Mar 24 16:20:10 2017 -0700
# Node ID ccac4af8923796bf53dba045d574dcfd68665fff
# Parent  d2674430b3d3eea1259e4fe2c1d7da539db9454f
rebase: don't require destination if commands.rebase.requiredest=False
Jun Wu - March 25, 2017, 1:49 a.m.
This looks good to me. Thanks for the fix!

Excerpts from Martin von Zweigbergk's message of 2017-03-24 16:35:08 -0700:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1490397610 25200
> #      Fri Mar 24 16:20:10 2017 -0700
> # Node ID ccac4af8923796bf53dba045d574dcfd68665fff
> # Parent  d2674430b3d3eea1259e4fe2c1d7da539db9454f
> rebase: don't require destination if commands.rebase.requiredest=False
> 
> diff -r d2674430b3d3 -r ccac4af89237 hgext/rebase.py
> --- a/hgext/rebase.py    Fri Mar 24 16:20:04 2017 -0700
> +++ b/hgext/rebase.py    Fri Mar 24 16:20:10 2017 -0700
> @@ -686,7 +686,7 @@
>          # Validate input and define rebasing points
>          destf = opts.get('dest', None)
>  
> -        if ui.config('commands', 'rebase.requiredest'):
> +        if ui.configbool('commands', 'rebase.requiredest'):
>              if not destf:
>                  raise error.Abort(_('you must specify a destination'),
>                                    hint=_('use: hg rebase -d REV'))
> diff -r d2674430b3d3 -r ccac4af89237 tests/test-rebase-base.t
> --- a/tests/test-rebase-base.t    Fri Mar 24 16:20:04 2017 -0700
> +++ b/tests/test-rebase-base.t    Fri Mar 24 16:20:10 2017 -0700
> @@ -419,6 +419,5 @@
>    saved backup bundle to $TESTTMP/repo/.hg/strip-backup/889b0bc6a730-41ec4f81-backup.hg (glob)
>    $ hg rebase -d 0 -r . -q
>    $ hg --config commands.rebase.requiredest=False rebase
> -  abort: you must specify a destination
> -  (use: hg rebase -d REV)
> -  [255]
> +  rebasing 2:279de9495438 "cc" (tip)
> +  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/279de9495438-ab0a5128-backup.hg (glob)
Yuya Nishihara - March 25, 2017, 4:52 a.m.
On Fri, 24 Mar 2017 18:49:14 -0700, Jun Wu wrote:
> This looks good to me. Thanks for the fix!
> 
> Excerpts from Martin von Zweigbergk's message of 2017-03-24 16:35:08 -0700:
> > # HG changeset patch
> > # User Martin von Zweigbergk <martinvonz@google.com>
> > # Date 1490397610 25200
> > #      Fri Mar 24 16:20:10 2017 -0700
> > # Node ID ccac4af8923796bf53dba045d574dcfd68665fff
> > # Parent  d2674430b3d3eea1259e4fe2c1d7da539db9454f
> > rebase: don't require destination if commands.rebase.requiredest=False

Sure, queued, thanks.
Ryan McElroy - March 25, 2017, 1:03 p.m.
On 3/25/17 4:52 AM, Yuya Nishihara wrote:
> On Fri, 24 Mar 2017 18:49:14 -0700, Jun Wu wrote:
>> This looks good to me. Thanks for the fix!
>>
>> Excerpts from Martin von Zweigbergk's message of 2017-03-24 16:35:08 -0700:
>>> # HG changeset patch
>>> # User Martin von Zweigbergk <martinvonz@google.com>
>>> # Date 1490397610 25200
>>> #      Fri Mar 24 16:20:10 2017 -0700
>>> # Node ID ccac4af8923796bf53dba045d574dcfd68665fff
>>> # Parent  d2674430b3d3eea1259e4fe2c1d7da539db9454f
>>> rebase: don't require destination if commands.rebase.requiredest=False
> Sure, queued, thanks.
>

Argh, sorry for the facepalm failures on the original series. I'll do 
better next time!

Patch

diff -r d2674430b3d3 -r ccac4af89237 hgext/rebase.py
--- a/hgext/rebase.py	Fri Mar 24 16:20:04 2017 -0700
+++ b/hgext/rebase.py	Fri Mar 24 16:20:10 2017 -0700
@@ -686,7 +686,7 @@ 
         # Validate input and define rebasing points
         destf = opts.get('dest', None)
 
-        if ui.config('commands', 'rebase.requiredest'):
+        if ui.configbool('commands', 'rebase.requiredest'):
             if not destf:
                 raise error.Abort(_('you must specify a destination'),
                                   hint=_('use: hg rebase -d REV'))
diff -r d2674430b3d3 -r ccac4af89237 tests/test-rebase-base.t
--- a/tests/test-rebase-base.t	Fri Mar 24 16:20:04 2017 -0700
+++ b/tests/test-rebase-base.t	Fri Mar 24 16:20:10 2017 -0700
@@ -419,6 +419,5 @@ 
   saved backup bundle to $TESTTMP/repo/.hg/strip-backup/889b0bc6a730-41ec4f81-backup.hg (glob)
   $ hg rebase -d 0 -r . -q
   $ hg --config commands.rebase.requiredest=False rebase
-  abort: you must specify a destination
-  (use: hg rebase -d REV)
-  [255]
+  rebasing 2:279de9495438 "cc" (tip)
+  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/279de9495438-ab0a5128-backup.hg (glob)