问题描述
我在Windows上使用乌龟hg,将本地驱动器上的存储库拉到了USB记忆棒上的存储库.
Using tortoise hg on windows, I did a pull from a repository on my local drive to a repository on a usb stick.
在拉动过程中,我猜想USB连接中有一个小故障,因为它在中途中断了.
During the pull i guess there was a glitch in the usb-connection because it got aborted half way through.
现在我不能再拉了.我收到消息:abandoned transaction found - run hg recover
Now i can't pull again. I get the message: abandoned transaction found - run hg recover
当我运行hg recovery时,我收到以下消息:
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
如果我尝试手动回滚,则会显示以下消息:no rollback information available
If i try to rollback manually i get this message: no rollback information available
这次,我可以很容易地删除存储棒上的整个备份并进行一次新的拉动,因为存储库很小并且USB存储棒不包含任何其他更改.但是,如果这种情况发生在我无法承担从头重新启动的更大的回购中时,该怎么办?我该如何恢复回购?
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?
推荐答案
我遇到了类似的问题,并且将其报告为错误,报告的开发人员建议该问题是日记损坏.如错误报告中所述,您可以运行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 use hg clone -r <#>
to recover up until that commit.
这篇关于Mercurial:“找到被放弃的交易-运行hg恢复".恢复不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!