[PATCH] mq: Add a new command, 'qrebase', to obviate need for 'qsave'
pwil3058 at bigpond.net.au
Tue Aug 25 03:57:45 CDT 2009
On 25/08/09 17:26, Adrian Buehlmann wrote:
> On 25.08.2009 01:37, Peter Williams wrote:
>> On 25/08/09 07:20, Greg Ward wrote:
>>> On Mon, Aug 24, 2009 at 8:49 AM, Peter Williams<pwil3058 at bigpond.net.au> wrote:
>>>> On 24/08/09 16:43, Dirkjan Ochtman wrote:
>>>>> On Mon, Aug 24, 2009 at 06:44, Peter Williams<pwil3058 at bigpond.net.au> wrote:
>>>>>> # HG changeset patch
>>>>>> # User Peter Williams<pwil3058 at bigpond.net.au>
>>>>>> # Date 1251088950 -36000
>>>>>> # Node ID 6b070b840907062dd1b65da17581ca3da75df8d1
>>>>>> # Parent 37042e8b3b342b2e380d8be3e3f7692584c92d33
>>>>>> mq: Add a new command, 'qrebase', to obviate need for 'qsave'
>>>> This should have been 'qreparent' not 'qrebase'.
>>> Or the code should add a 'qrebase' command, which IMHO is preferable.
>>> Is the command in question like running
>>> hg qpop -a
>>> hg update tip
>>> hg qpush -a
>> hg qpush -ma
>>> but with smarter merging (ie. no more .rej files)? If so, I'd call it
>> I was originally going to make it 'qrebase' but changed my mind when
>> trying to write the help message. I feel that 'qreparent' is more
>> compatible with the MQ terminology than 'qrebase'. I.e. considering the
>> semantics of the 'qparent' and 'qbase' tags. It's mostly 'qparent'
>> that's being changed by the command.
>> In fact, while walking the dog this morning, I toyed with the idea of
>> suggesting that 'rebase' be renamed 'reparent' but decided against it :-).
> In case this new command should make it into mq:
> I really dislike using 'qreparent' for the name of this new command.
> Please stick to using the term rebase, which is a well known term.
> 'qreparent' is just way too confusing on the side of 'hg rebase'.
qreparent doesn't have to be seen in the context of rebase. It has to
be seen in the context of MQ and the way it talks about things. Most mq
users (like me) have never heard of rebase until this thread started as
a consequence of a suggestion to remove qsave.
> Taking 'qreparent' as the name, only because you _think_ 'rebase' should
> better be renamed to 'reparent' is a red herring.
It went the other way actually. I decided qreparent was better than
qrebase for mq when I tried to write a help message describing qrebase
in the terminology of mq. It was very hard.
I then thought maybe rebase should be renamed but decided no (because I
assumed that its name made sense in the other situations in which it is
used). So stop panicking. That I mentioned it at all was meant to be a
joke. Didn't you see the :-)?
> Since 'hg rebase' never will be renamed (or aliased) to 'hg reparent'
> anyway, you'd better stick to using the current terminology and use
> the analogous 'qrebase', so everybody can reuse and reapply current
I am. But I'm using mq terminology and rebase isn't part of mq. MQ
talks about parents and in its terminology the base is the first patch
in the series (see the tags, qparent and qbase, that it uses -- qbase
tags the first patch in the queue and qparent points to qbase's parent).
In this context 'qrebase' is confusing. What's going to happen is
that the series is going to get a new qparent so qreparent makes more sense.
> Besides the name: If there is a reason not to execute 'hg rebase' if
> there are mq patches applied, then rebase probably should later be
> adapted to refuse executing and give an error message with a hint to use
> 'qrebase' instead.
The same problems (that currently occur with rebase) will also occur
with qreparent as it uses rebase BUT I think that it's safe to assume
that rebase's problems will be fixed. After all they don't only affect
MQ -- there just more likely to occur there.
Rebase is still the best potential solution (when the remaining bugs are
fixed) to the problem of updating a MQ patch series when the underlying
code changes. We're really just argu^H^H^H^Hdiscussing what the
interface should look like. My argument is that there should be an
easier to use interface than using raw rebase and that it should be part
of mq itself.
Peter Williams pwil3058 at bigpond.net.au
"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce
More information about the Mercurial-devel