Mercurial:“发现放弃的事务 - 运行 hg 恢复”。恢复不起作用
在 Windows 上使用 tortoise hg,我从本地驱动器上的存储库拉取到 U 盘上的存储库。
在拉动过程中,我猜 USB 连接出现了故障,因为它在中途中止了。
现在我再也拉不动了。我收到消息:发现已放弃的事务 - 运行 hg recovery
当我运行 hg recovery 时,我收到以下消息:
rolling back interrupted transaction
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or [email protected]
** Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]
** Mercurial Distributed SCM (version 1.6.3)
** Extensions loaded: fixfrozenexts
Traceback (most recent call last):
File "hg", line 36, in <module>
File "mercurial\dispatch.pyo", line 16, in run
File "mercurial\dispatch.pyo", line 34, in dispatch
File "mercurial\dispatch.pyo", line 54, in _runcatch
File "mercurial\dispatch.pyo", line 494, in _dispatch
File "mercurial\dispatch.pyo", line 355, in runcommand
File "mercurial\dispatch.pyo", line 545, in _runcommand
File "mercurial\dispatch.pyo", line 499, in checkargs
File "mercurial\dispatch.pyo", line 492, in <lambda>
File "mercurial\util.pyo", line 420, in check
File "mercurial\commands.pyo", line 2869, in recover
File "mercurial\localrepo.pyo", line 606, in recover
File "mercurial\transaction.pyo", line 173, in rollback
ValueError: too many values to unpack
如果我尝试手动回滚,我收到此消息:没有可用的回滚信息
code>
这次我可以很容易地删除我的棒上的整个备份并进行新的拉取,因为存储库很小并且 USB 棒不包含任何其他更改。但是,如果这种情况发生在一个更大的仓库上,而我无法从头开始重新启动怎么办?我怎样才能恢复回购?
Using tortoise hg on windows, I did a pull from a repository on my local drive to a repository on a usb stick.
During the pull i guess there was a glitch in the usb-connection because it got aborted half way through.
Now i can't pull again. I get the message: abandoned transaction found - run hg recover
When i run hg recover i get the following message:
rolling back interrupted transaction
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or [email protected]
** Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]
** Mercurial Distributed SCM (version 1.6.3)
** Extensions loaded: fixfrozenexts
Traceback (most recent call last):
File "hg", line 36, in <module>
File "mercurial\dispatch.pyo", line 16, in run
File "mercurial\dispatch.pyo", line 34, in dispatch
File "mercurial\dispatch.pyo", line 54, in _runcatch
File "mercurial\dispatch.pyo", line 494, in _dispatch
File "mercurial\dispatch.pyo", line 355, in runcommand
File "mercurial\dispatch.pyo", line 545, in _runcommand
File "mercurial\dispatch.pyo", line 499, in checkargs
File "mercurial\dispatch.pyo", line 492, in <lambda>
File "mercurial\util.pyo", line 420, in check
File "mercurial\commands.pyo", line 2869, in recover
File "mercurial\localrepo.pyo", line 606, in recover
File "mercurial\transaction.pyo", line 173, in rollback
ValueError: too many values to unpack
If i try to rollback manually i get this message: no rollback information available
This time i can quite easily just delete the whole backup on my stick and do a fresh pull because the repo is small and the usb-stick does not contain any other changes. But what if this happens on a larger repo where i can't afford to restart from scratch? How can i recover the repo?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我遇到了类似的问题,并将其报告为错误,以及报告中的开发人员表明问题是损坏的日志。正如错误报告中所述,您可以运行
hg verify
来查看最后一次“良好”提交,并使用hg clone -r <#>
进行恢复,直到那个承诺。I experienced a similar issue and reported it as a bug, and the developer on the report suggested the problem is a corrupt journal. As described in the bug report, you can run
hg verify
to see the last "good" commit, and usehg clone -r <#>
to recover up until that commit.我认为这实际上是代码源中的一个错误。您应该按照错误消息中的说明向 Mercurial 团队报告该错误。
I think this is actually a bug in the code source. You should report the error to the Mercurial team like said in the error message.
我正在使用 TeamCity CI 和部署服务器,因此,这可能是另一个问题,但我已将答案发布到 类似问题。
I was using the TeamCity CI and Deployment server, so, probably, this is another issue, but I have posted the answer to the similar question.