Undo an hg push (backout?)

前端 未结 4 1425
野趣味
野趣味 2020-12-24 01:38

I made a big oops, and could use some help undoing it.

We have two repositories-a fairly stable repository, and a repository we\'re working on changes in. I just ma

4条回答
  •  星月不相逢
    2020-12-24 01:47

    I think it to late to make hg rollback since you have already pushed your changes.

    You might try with MQ extensions but this also works locally. hg strip will only modify your local repo. You could of course try to modify your server repo directly on server but if somebody pulled it it is too late.

    Another option is described in chapter 9 of hgbook in section Backing out a merge. It involves hg backout command but it might be an overkill for you...

    I suggest to hg update -C to *a revision, merge with tip and ignore all changes from *merge? Your repository will look more or less like this than:

    *second merge
     |  \ 
     |   \ 
     |    \     
     |     \ 
    *merge | 
    | \    |
    |  \   |
    |   *b |
    *a  | /
    |  / /
    *c---
    

    Commands for this are

    • $ hg --config ui.merge=internal:local merge #keep my files
    • $ hg --config ui.merge=internal:other merge #keep their files

    More details could be found here.

提交回复
热议问题