[PATCH 04 of 10] rebase: improve error message for base revision

Mads Kiilerich mads at kiilerich.com
Tue Jan 14 20:25:45 CST 2014


would also be confusingOn 01/13/2014 08:29 AM, Pierre-Yves David wrote:
> On Sun, Jan 12, 2014 at 05:08:02PM +0100, Mads Kiilerich wrote:
>> # HG changeset patch
>> # User Mads Kiilerich <madski at unity3d.com>
>> # Date 1384730518 18000
>> #      Sun Nov 17 18:21:58 2013 -0500
>> # Node ID 55325a119cbeea17c2379bbe23f20d6226442a03
>> # Parent  ef40ccf4914c597e32885227dde08abe40e41ad5
>> rebase: improve error message for base revision
>>
>> Before it just said 'nothing to rebase', now it also hints to the reason:
> I like the idea of improving rebase error message but this one about base is confusing.
> The argument from base is "changeset to compute a base from" not "base changeset".

"compute a base from" - is that an official description somewhere? What 
is a "base" really? The set it is computing from "base" can not really 
be called a "base".

I will call it "base" and quote it. Reading that and the option name as 
"smurf" makes it more readable than when trying to think of it as some 
kind of base ;-)

And more important: I will avoid mentioning "base" when it working 
directory is used as default.

> So I would made the following changes:
>
>> nothing to rebase - NODE is both base and destination
> nothing to rebase - NODE is both source and destination
>
>> nothing to rebase - base NODE is already an ancestor of destination NODE
> cannot rebase - destination NODE is based on source NODE

I don't think "based on" would be helpful. I think 'ancestor' is better.

It would also be confusing to call the value that the user specified 
with --base for "source".

>
>> 'base revset is empty',
> nothing to rebase - can't compute base from empty revset

But it is not a base it is computing!

> Moreover reading this test ouput puzzled me:
>
>>    $ hg rebase
>>    nothing to rebase - e7ec4e813ba6 is both base and destination
> What about dedicated detection and a more specific message.
>
> nothing to rebase - already on BRANCH tipmost head
> (do you want to use to use --dest or --base?)

That can perhaps be introduced later. I would like to get the dest 
computation under control first.

> I starting to thing --base could have been better named --branch (but then
> people would think it is about named branch)

It is not directly specifying the branch. It only gives meaning relative 
to a dest, and then it is giving a hint, pointing at a subtree, 
identifying a branch, selecting a side. Some of these words can perhaps 
be used.


I have resent the least controversial parts of the queue with some 
changes based on your input. Thanks.

/Mads


More information about the Mercurial-devel mailing list