Mercurial:“发现放弃的事务 - 运行 hg 恢复”。恢复不起作用

发布于 2024-10-29 21:24:47 字数 1623 浏览 5 评论 0原文

在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

余罪 2024-11-05 21:24:47

我遇到了类似的问题,并将其报告为错误,以及报告中的开发人员表明问题是损坏的日志。正如错误报告中所述,您可以运行 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.

标点 2024-11-05 21:24:47

我认为这实际上是代码源中的一个错误。您应该按照错误消息中的说明向 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.

玻璃人 2024-11-05 21:24:47

我正在使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文