Hg: How to restore changes that have been fixed?

I made and made changes to my branch.

Someone else mistakenly merged and made changes to the default branch.

To fix their mistake, they used hg backoutthe default.

Then people made a bunch of other default changes.

I did not understand that apostasy had occurred, and I wanted to get the latest changes. Thus, I combined and accepted a default in my branch.

Now the current state of my branch does not contain my changes.

What is the right way to revert my previous changes and keep unrelated changes from default that I want to save?

So far, I have tried to merge my previous change into my working copy, but I do not like merging with the ancestor, and I tried to export the changes as a patch and import them again, but get import errors.

It's funny, I like to switch to Mercurial from Subversion, but every time I think I can hang it, a new look comes up: -P

+3
source share
2 answers

Backup. This is just a regular commit, changing what was changed, so it should work fine by changing what was changed back.

+4
source

Maybe get the rev number, then clone it:

hg log --style compact

hg clone -r REV your-current-repo new-repo

0
source

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


All Articles