[PATCH] transplant: permit merge changesets via --force/-f

Steven Stallion sstallion at gmail.com
Wed Mar 28 11:08:44 CDT 2012


On Wed, Mar 28, 2012 at 1:03 AM, Pierre-Yves David
<pierre-yves.david at logilab.fr> wrote:
> On Tue, Mar 27, 2012 at 09:21:47AM -0700, Steven Stallion wrote:
>> On Tue, Mar 27, 2012 at 2:15 AM, Pierre-Yves David
>> <pierre-yves.david at logilab.fr> wrote:
>> >> This change permits the transplant extension to operate on merge
>> >> changesets by way of --force/-f.  This is particularly useful for
>> >> workflows which cherrypick branch merges rather than each commit
>> >> within a branch.
>> >
>> > Graft in a new core command introduced in mercurial 2.0.
>> >
>> > It does the transplant job but with better merge mechanism (and in core).
>> >
>> > You might consider patching graft instead.
>
>> graft would be ideal, however we cherrypick between repositories -
>> something that graft is not able to do (as far as I know!)
>
> It can if you use an intermediate repository containing history of both repo. It can
>
>    $ hg init both
>    $ cd both
>    $ hg pull ../first
>    $ hg pull --force ../second # mercurial complaint about unrelated repository
>    $ hg up some-changeset-of-first
>    $ hg graft some-changeset-of-second
>    $ hg push -r . ../first # be careful not to push content of "second" in you main "first" repo.

Unfortunately this could lead to some really nasty results with some
of the more junior engineers. Transplant ends up making this more or
less fool-proof. If graft were to support this natively that would be
a compelling reason to move over.

> ps: My first name is Pierre-Yves

Mea culpa :)

Steve


More information about the Mercurial-devel mailing list