1

In mercurial, the merge ignored some files (possibly a human mistake). How I can 're-include' the ignored files?

Scenario: the merge target(rev #47) has 5 files, but the merge(rev #50) has included just 1 file and others are ignored.

merge target

after the merge

Apparently, when I check the resulting code, the code from Rev# 47 is missing.

1 Answers1

0

You probably did the merge in a way you didn't intend, e.g. telling hg to only accept changes from one branch, discarding the changes from the merged rev47.

The easiest way is to start with a repo where the merge did not happen and re-do the merge. This is not possible, if it is a shared repo and that merge is already shared with others. If it everything local, but if that repo is your only copy, make a new clone without the merge: hg clone -r49 OLDREPO .

Thus if you cannot simply re-do the merge on a new repo without that merge, you'll have to go a longer way which is summarized in this answer. Note the screenshot in the accepted answer and DO NOT discard the changes from the merge target.

Community
  • 1
  • 1
planetmaker
  • 5,884
  • 3
  • 28
  • 37