TortoiseHG:撤消失败的提交
我使用 TortoiseHG 一段时间了,偶尔也会遇到同样的问题。
有时,当我提交工作时,它会给我一个错误,说我的一个(或多个)文件正在被另一个进程使用。但是,提交仍然会完成并且在存储库浏览器中可见。
接下来,在关闭导致错误的进程后,我重新打开提交对话框,其中显示仍有需要提交的更改(意味着第一次提交实际上没有执行任何操作)。我进行了另一次提交,这完成了我最初想做的事情,但现在我遇到了一个不同的问题:存储库现在有两个头。当然,在此之后我被迫合并两个头,但我的过程似乎不干净。
是否有更好的方法来解决这样的问题,例如通过某种方式撤消提交(但不恢复我的文件),或者我不应该费心清理这样的东西向上?
I've been using TortoiseHG for some time now and I've been running into the same issue once in a while.
Sometimes, when I commit my work, it gives me an error, saying that one (or more) of my files is being used by another process. However, the commit still goes through and is visible in the repository browser.
Next, after closing the processes that caused the error, I reopen the commit dialog that says that there are still changes to be committed (meaning the first commit didn't really do anything). I do another commit, which accomplishes what I wanted to do in the first place, but now I have a different problem: the repository now has two heads. Of course, I'm forced to merge the two heads after this, but my process seems unclean.
Is there a better way to get around such a problem, such as by somehow undoing the commit (but not reverting my files), or should I not bother cleaning stuff like this up?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
命令行中的 hg rollback 应该恢复提交,但不恢复更改(我不使用 tortoisehg,所以不清楚它是否将其放入一个漂亮的 UI 中)。
hg rollback
at the command line should revert the commit but not the changes (I don't use tortoisehg, so unclear if it puts that in a nice UI).