How can I cancel merge reserve in mercurial?

I looked at SO but didn't see my exact case here, so I hope someone can help.

The SCons project (https://bitbucket.org/scons/scons) runs in the default branch. I recently mistakenly combined AND PUSHED some changes from the developer repository (calling it DEV) that were not ready for merging. Therefore, I had to cancel these changes (hg backout -rXXX --parent YYY) and click on the bitbucket. But how can we move on? The archive wiki page says:

A warning. Backing up will cause problems if you ever want to merge again. The only safe way to deal with bad mergers is to abandon the branch.

Of course, we cannot refuse the default branch. Thus, now DEV cannot merge with the main repo, or it will lose all its changes in the process (because my rollback removes them). Now no one can merge with the DEV repository, because the replica bitbucket already has all its changes (and indentation). It seems we are in a difficult position.

I have two questions:

  • What should we do now so that DEV can make progress: he needs a repo with his changes, where he can work, in such a way that when he did this, he can be merged into a bitbucket repository.

  • What should I have done as soon as I discovered that the pushed merge was wrong?

(Note: there are no named branches here, all by default.)

Thanks!

+4
source share
2 answers

Of course, we cannot refuse the default branch.

Sure. Upgrade to the merger and continue working there, now here's the tip. If there are changes on the old branch, you need to graft them. You can then do a no-op merge to tie the dead head, or you can just close it with hg commit --close-branch . Check out this answer .

+1
source

There is no time to verify this, but I think it should work as follows:

  • Dev pulls out of the main repo
  • makes a backup copy and then
  • continues to work on his function locally.

In this state, others should also not have problems merging new changes with DEV.

0
source

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


All Articles