Mercurial Getting out of a bad merge -


i merged branch b, , reason merge did not go well. want revert b before merge , try again never happened before. thinking of doing

hg clone myrepo newrepo -r -r 12345 

where 12345 revision number before b's bad merge commit

i think works, have lot of other branches (most of closed using commit --close-branch) , puts branches inactive state.

is there way clone except revision 123456 or something? (where 123456 bad commit on b)

assuming have not pushed merge changeset public location, easiest solution use hg strip command comes mercurial queues (i.e. mq) extension.

from wiki:

hg strip rev removes rev revision , descendants repository. remove unwanted branch, specify first revision specific branch. default, hg strip place backup in .hg/strip-backup/ directory. if strip turned out bad idea, can restore hg unbundle .hg/strip-backup/filename.


Comments