windows Mercurial:“发现被遗弃的交易 - 运行汞恢复”。恢复不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5529207/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Mercurial: "abandoned transaction found - run hg recover". Recover does not work
提问by ice
Using tortoise hg on windows, I did a pull from a repository on my local drive to a repository on a usb stick.
在 Windows 上使用 tortoise hg,我从本地驱动器上的存储库中拉取到 USB 记忆棒上的存储库。
During the pull i guess there was a glitch in the usb-connection because it got aborted half way through.
在拉动过程中,我猜 USB 连接出现了故障,因为它在中途中止了。
Now i can't pull again. I get the message: abandoned transaction found - run hg recover
现在我不能再拉了。我收到消息:abandoned transaction found - run hg recover
When i run hg recover i get the following message:
当我运行 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
If i try to rollback manually i get this message: no rollback information available
如果我尝试手动回滚,则会收到以下消息: 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?
这次我可以很容易地删除我的记忆棒上的整个备份并重新拉,因为 repo 很小而且 USB 记忆棒不包含任何其他更改。但是,如果这种情况发生在我无法从头开始重新启动的大型存储库中,该怎么办?我怎样才能恢复回购?
回答by eykanal
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.
我遇到了类似的问题并将其报告为错误,报告中的开发人员建议问题是一个损坏的日志。如错误报告中所述,您可以运行hg verify
以查看最后一次“良好”提交,并用于hg clone -r <#>
恢复直到该提交。
回答by krtek
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.
我认为这实际上是代码源中的错误。您应该像错误消息中所说的那样向 Mercurial 团队报告错误。
回答by ivan.mylyanyk
I was using the TeamCity CI and Deployment server, so, probably, this is another issue, but I have posted the answerto the similar question.