Mercurial:如何从中断的“qpop -a”中恢复?

时间:2012-06-08 13:32:49

标签: mercurial mercurial-queue

我已经在队列中导入了几个修订版并试图将它们全部弹出。不幸的是,根据访问同一存储库的其他一些Mercurial客户端,hg qpop -a未成功完成:

> hg qpop -a
popping 115.diff
popping 114.diff
popping 113.diff
popping 112.diff
popping 111.diff
abort: The process cannot access the file because it is being used by
another process
C:\Program Files (x86)\Mercurial\library.zip\mercurial\dispatch.py:217:
DeprecationWarning: use lock.release instead of del lock

现在我再也无法推回补丁了。 Mercurial总是抱怨“未知节点”:

> hg qpush -a
mq status file refers to unknown node b6fb614866f1
abort: working directory revision is not qtip

这意味着什么以及如何解决这个问题?

1 个答案:

答案 0 :(得分:18)

听起来你的手术失败了。很久以前(link)向hg邮件列表报告了类似的问题。您应该查看经过恢复过程的blog post by Andreas Wuest

它基本归结为:

$ > .hg/patches/status          # force mq to think no patches are applied
$ hg debugrebuildstate -r tip   # rebuild your working copy

这不会破坏您的修补程序队列,也不会丢失任何不属于修补程序的工作副本更改。但是,您需要仔细检查(并修复)文件版本才能返回到干净的工作副本。