Manual merge for some files during rebase (using TortoiseHg)

Steve Borho steve at borho.org
Thu Oct 29 22:30:36 CDT 2009


On Thu, Oct 29, 2009 at 9:53 PM, Afriza N. Arief <afriza.na at gmail.com> wrote:
>> I think this is a straight-forward merge/rebase question.   Rebase
>> uses Mercurial's merge machinery so you should be able to get the
>> behavior you want by creating well tweaked [merge-patterns] and
>> [merge-tools] ini sections.
>>
>> This may cause a rebase to be interrupted, though, requiring you to
>> finish it on the command line.
>>
>> --
>> Steve Borho
>
> Thank you all for the help.
> I found a way to prevent the auto commit.
> 1) do hg rebase
> 2) during the conflict and KDiff3 pops-up on the problem file, close it
> without saving. this will not mark the problem file as "resolved"

I think the following ini section would do this automatically

[ merge-patterns ]
**.vcproj = internal:fail

> 3) continue merging non-problematic files (if any)
> 4) do hg resolve on the problem file, and some other files if you want. this
> will pop-up the KDiff3. select "Choose B everywhere" to choose one good
> copy, save, and close KDiff3.

The thg 0.9 commit tool will allow you to automate this quite a bit.
It allows you to pick the merge tool to use for the resolve, and among
the merge tool options are internal:local and internal:other.  The
latter has the same effect as what you've done here with kdiff3.

> 5) verify the merge result by running IDE, compile, and fix errors
> 6) mark the files as resolved using hg resolve -m
> 7) continue/complete the rebase process by doing hg rebase --continue
> 8) done!

Glad you've found a process that works for you.

--
Steve Borho



More information about the Mercurial mailing list