[PATCH 02 of 10] rebase: improve error message for empty --rev set

Mads Kiilerich mads at kiilerich.com
Thu May 1 08:54:00 CDT 2014


On 05/01/2014 03:41 PM, Matt Mackall wrote:
> On Thu, 2014-05-01 at 03:04 +0200, Mads Kiilerich wrote:
>> On 04/29/2014 09:24 PM, Matt Mackall wrote:
>>>> # HG changeset patch
>>>> # User Julien Cristau <julien.cristau at logilab.fr>
>>>> # Date 1398253895 -7200
>>>> #      Wed Apr 23 13:51:35 2014 +0200
>>>> # Branch stable
>>>> # Node ID 8a0d3c3e18434f39633ef165439763447beda7bf
>>>> # Parent  dae36d3e1c60465bfb56f210b4cb3b231f46e5dd
>>>> rebase: don't abort if we're asked to rebase an empty revset
>>> Queued for stable, thanks.
>> Just checking: Should it still be an abort error to specify an empty
>> revset as source or base? Or should that also be a soft error?
> We've documented an exit code of 1 for "nothing to rebase". One obvious
> way to use revsets with rebase is "please move all my crap to the head",
> with a revset like "not ::@" or "secret()" or "bookmark()". If those
> happen to result in nothing to move, that's not user error, it's just a
> no-op.

I still think it makes a difference whether there is nothing to rebase 
because the revisions the user care about already has been rebased, or 
if the user just don't care about any revisions. But fine, that is how 
you want it and that is how it is now.

But that was not my question. The question is if empty "source" or 
"base" revsets should be 1="nothing to rebase" or an abort?

/Mads


More information about the Mercurial-devel mailing list