selected revisions in merge

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri May 16 00:11:41 UTC 2014



On 05/15/2014 05:05 PM, Colin Caughie wrote:
> On 5/15/2014 9:14 AM, Matt Mackall wrote:
>> On Thu, 2014-05-15 at 10:42 -0500, David Wink wrote:
>>> Guys,
>>> Is there a way that I can select certain revisions to merge from a
>>> branch
>>> into default.  In the case of a maven project I make changes into a
>>> release
>>> branch that I want to merge back into my default branch but do not
>>> want to
>>> pull changes to the Pom files.  If I just do a hg merge by default it
>>> will
>>> pull everything into default.  Is there a way to just pull in the
>>> changes I
>>> want from that release branch?  How are others doing this with maven
>>> projects now?
>> hg help graft
>>
> Graft may be what you want, alternatively if you just want to omit
> certain *files* from the merge (as opposed to certain revisions) you
> could also do something like:
>
> hg merge release-branch
> hg revert -r default glob:**.pom
> hg commit

In that case, the change will be lost for ever for that branch and any 
subsequent merge will exclude them.

So be careful about what you really wants.

-- 
Pierre-Yves David



More information about the Mercurial mailing list