Mercurial: One-Time Change Application to Solve Merge Issues

I recently tried combining a series of change sets and ran into a huge amount of merge issues. Therefore, I would like to try to apply each set of changes, one at a time, to simplify the management of merge issues.

I will give an example with 4 problematic change sets (514, 515, 516 and 517) [in my real case, I have a little more]

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

Please note that I have clones of my repositories before pulling the problematic changes.

When I pull out 4 sets of changes and try to merge, everything is too difficult to solve.

So, I wanted to pull out only changeet 514, and then merge. Then, as soon as I solve the merge problem, pull out only changeet 515 and apply it, etc. (I know that the numbering will change, this is not my problem).

How should I do this, preferably without using any extension? (because I would like to understand Mercurial and what I'm doing better).

Is it possible to create a patch between 508 and 514 and apply this patch? (if so, how would I generate this patch)

Answers, including specific examples from the command line, are most welcome :)

+4
source share
2 answers

I have not tested this, but merging individual sets of changes should be simple enough:

 $ hg update -r 513 $ hg merge -r 514 ... # do your conflict resolution and commit $ hg merge -r 515 ... # repeat 
+4
source

I did not test either, but it should work only with hg up for each of the external changesets one by one. I do not think you should commit between updates.

As a bonus in the command line example, you wished :-)

 hg up 513 hg up 514 hg up 515 hg up 516 hg up 517 
+1
source

Source: https://habr.com/ru/post/1311026/


All Articles