删除TortoiseHG和Mercurial中的修订 [英] Remove a revision in TortoiseHG and Mercurial

查看:88
本文介绍了删除TortoiseHG和Mercurial中的修订的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的存储库中,我需要还原到旧版本.我确实进行了还原,并进行了所需的更改.如何将新修订推向上游?

In my repository I needed to revert to an older revision. I did reverting and made the changes I needed to. How do I push the new revision upstream?

当我需要恢复到13版时,我的版本是17.现在,我进行了更改,现在是18版.事情就是,当我要推动这些更改时(我正在使用TortoiseHG),出现错误"abort:push create new remote head.

I was on rev 17 when I needed to revert back to rev 13. Now that I've made my changes, I'm on rev 18. Thing is, when I go to push these changes up (I'm using TortoiseHG), I get an error "abort:push create new remote head.

我不想合并.我要使用--force命令强制执行还是要删除版本14-17?如果需要删除,如何删除14-17.?

I don't want to do a merge. Do I want to do a force with the --force command or do I need to delete rev 14-17. If I need to delete, how do I delete 14-17.?

推荐答案

正确的解决方案是与选项Discard all changes from merge target (other) revision实际合并.但是有时候生活对我们来说更加艰难,我们确实需要放弃一些更改(例如,我们提交了核发射代码或其他一些对安全性敏感的数据).那是你的情况吗?如果是的话,请遵循.

Proper solution is to actually merge with option Discard all changes from merge target (other) revision. But sometimes life is harder on us and we really need to drop some changes (eg. we committed nuclear launch codes or some other security sensitive data). Is that your case? If yes then follow.

假设未发布原始更改,您可以:

Assuming that original changes were not published you could:

  • 启用mq扩展名
  • r单击有问题的更改,然后执行Modify history->Strip. 这将从您的本地历史记录中永久删除更改.
  • enable mq extension
  • r-click on offending changes and execute Modify history->Strip. This will permanently remove changes from your local history.

这篇关于删除TortoiseHG和Mercurial中的修订的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆