Reputation: 702
I have this scenario. First of nothing, yes I know, we are working directly on the trunk, that will change tomorrow (literally).
This guy merged code and walked over everybody else code. I'd like to bring up the 1625 REV. Is there a way? I don't care losing what comes next, he deserves to do his work again.
I was thinking doing a branch from 1625. But what would happen if I want to merge with default later? Can I just stay with everything that would be in the new branch?
Upvotes: 0
Views: 675
Reputation: 3454
Try this recipe:
repo
to repo-clone
.repo-clone
to good revision.repo
to tip revision.repo
.repo-clone
to repo
.repo
with hg ci -A -m 'Backout bad merges'
.The last command will add all untracked files and forget all missing files before commit. With this recipe you'll get exactly the same state of working directory as in the good revision.
Upvotes: 1
Reputation: 2856
Basically like this: check out the good version, merge the other head, revert to the good version, commit.
hg up -C <good>
hg merge <bad>
hg revert -r <good> --all
hg resolve -m #if necessary
hg ci -m kill-merge
hg diff -r <good> #should be empty
Upvotes: 3