Graft can't collapse and rebase --collapse does not record all metadata

Lawrence Stewart lstewart at room52.net
Thu Jan 29 08:18:35 UTC 2015


On 01/29/15 04:11, Matt Mackall wrote:
> On Tue, 2015-01-27 at 18:21 -0700, Bryan Murdock wrote:
>> On Tue, Jan 27, 2015 at 5:59 PM, Lawrence Stewart <lstewart at room52.net> wrote:
>>> Hi Bryan,
>>>
>>> On 01/28/15 11:51, Bryan Murdock wrote:
>>>> On Tue, Jan 27, 2015 at 5:38 PM, Lawrence Stewart <lstewart at room52.net> wrote:
>>>>>
>>>>> Any further thoughts from the community?
>>>>
>>>> Have you looked into the evolve extension for Mercurial?  It (among
>>>> other things) adds a fold command that combines multiple commits
>>>> together.  I'm not sure if it would meet all your requirements but
>>>> it's probably worth trying it to find out.
>>>
>>> I have not, but thanks for the suggestion. Do you know if it records the
>>> meta data of all folded changesets? If not, I would think it is no
>>> better than rebase --collapse?
>>
>> I'm not clear on what meta data you want recorded.  It pops open your
>> editor with the commit messages of all folded changesets combined into
>> one commit message that you can then edit.  You can add your notes
>> about code reviews and whatnot at that point.  Any more than that I
>> wouldn't know.
> 
> Evolve explicit records and propagates that "X replaces changesets A, B,
> C.." with its obsolete markers.

So after a quick look at evolve, it's a non starter for us until such
time as it is distributed with Mercurial as a first class supported
extension.

Re meta data, the concept of replacing change sets is more inline with
history editing a la rebase and strip, when what I'm after conceptually
is "this changeset to the prod branch is an amalgam of published (i.e.
pushed) changesets A, B, C on the dev branch" - quite different and very
much aligned with the intent of graft.

I think I'll open a feature request against graft in Bugzilla as it is
not sounding like there is a sane or canonical way to achieve the
desired outcome with existing functionality. I imagine it would actually
be a very simple change to have graft replay each commit serially to the
working copy and commit everything at the end post conflict resolution.

Cheers,
Lawrence



More information about the Mercurial mailing list