Mercurial: applying changes one by one to resolve merging issues

Posted by Webinator on Stack Overflow See other posts from Stack Overflow or by Webinator
Published on 2010-05-26T22:36:14Z Indexed on 2010/05/26 22:41 UTC
Read the original article Hit count: 230

Filed under:
|

I recently tried to merge a series of changeset and encountered a huge number of merging issues. Hence I'd like to to try to apply each changeset, in order, one by one, in order to make the merging issues easier to manage.

I'll give an example with 4 problematic changesets (514,515,516 and 517) [in my real case, I've got a bit more than that]

o changeset: 517
|
o changeset: 516
|
o changeset: 515
|
o changeset: 514
|
|
| @ changeset: 513 
| |
| o changeset: 512
| |
| o
| |
| o
| |
| o 
|/
|
|
o changeset 508

Note that I've got clones of my repos before pulling the problematic changesets.

When I pull the 4 changesets and try a merge, things are too complicated to resolve.

So I wanted to pull only changeset 514, then merge. Then once I solve the merging issue, pull only changeset 515 and apply it, etc. (I know the numbering shall change, this is not my problem here).

How am I supposed to do that, preferably without using any extension? (because I'd like to understand Mercurial and what I'm doing better).

Is the way to go generate a patch between 508 and 514 and apply that patch? (if so, how would I generate that patch)

Answers including concrete command-line example(s) most welcome :)

© Stack Overflow or respective owner

Related posts about mercurial

Related posts about merge