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

Steven Stallion sstallion at gmail.com
Fri Mar 30 17:06:21 CDT 2012


On Fri, Mar 30, 2012 at 2:58 PM, Brendan Cully <brendan at kublai.com> wrote:
> Hi,
>
> Two comments:
>
> 1. A minor point, but I'd rather not burn -f on this option. I could
> imagine having other things be forced. Maybe --transplant-merges or
> something.

Sure thing. I struggled with this as well - I'm certainly not married
to the idea of -f/force. Would something like --force-merge be a
better option that --transplant-merges (DRY principle).

> 2. More seriously, this seems to require either special care or luck
> to work, since as far as I can tell it just applies the diff between
> the merge and its first parent, where there's nothing to ensure that
> the branch you're transplanting onto is similar to the first parent
> instead of the second. It seems like there ought to be some kind of
> control over which parent is used, but I don't know exactly what it
> should look like. Have you thought about this problem?

It works very well if you maintain repositories which consist of
nothing but transplanted changesets. The model we traditionally follow
is to have one development repository and maintain a separate
repository for each major release. We transplant feature branch merges
from the development repo after a base revision is chosen. Transplants
are *always* done/to the default branch. This could definitely burn
someone if they are not careful, but in the last year and a half or so
with a good-sized engineering organization we've never had this issue
come up.

Steve


More information about the Mercurial-devel mailing list