在没有 --svn 的情况下 Rebase 后修复 HgSubversion 存储库

发布于 2024-12-27 04:40:27 字数 111 浏览 4 评论 0原文

我已经愉快地使用 HgSubversion 一段时间了,今天我忘记将 --svn 添加到 rebase 命令中。 现在我得到了可怕的未知修订版“

有办法从中恢复吗?”

I have been happily using HgSubversion for awhile and today I forgot to add the --svn to the rebase command.
Now i get the dreaded unknown revision ''

Is there a way to recover from this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

画中仙 2025-01-03 04:40:27

您应该能够执行“hg svnrebuildmeta”,然后执行“hg pull”并让它修复内容。

注意:这是未经测试的,所以我会处理本地存储库的副本,以防万一它搞砸了。我对代码的记忆表明这会起作用。

You should be able to do "hg svn rebuildmeta" and then do "hg pull" and have it repair things.

Note: this is untested, so I'd work on a duplicate of the local repo in case it screws things up. My memory of the code suggests this will work.

☆獨立☆ 2025-01-03 04:40:27

我尝试使用 transplant 扩展来解决此问题:

  1. 将 SVN 存储库重新克隆到新的本地存储库。
  2. 检查原始存储库的历史记录并记下需要移动哪些更改
  3. 将更改从旧存储库移植到新存储库

例如 - 修复名为 projecthgsubversion 存储库:

> hg clone svn+http://svnrepo/project project-tmp

然后检查原始项目文件夹的日志,然后从 project-tmp 文件夹执行以下操作:

> hg transplant -s ../project 1234

其中 1234 是您要移动的修订版本。重复此操作,直到复制所有修订。

完成后,您应该能够开始使用新文件夹来代替旧文件夹,方法是从 SVN 重新拉取,重新调整您的更改并将其推回(不要忘记 --svn)

I'd try using the transplant extension to fix this:

  1. Re-clone the SVN repository to a new local repository.
  2. Examine the history of the original repository and note which changes need moving
  3. Transplant the changes from the old repository to the new repository

For example - fixing an hgsubversion repo called project:

> hg clone svn+http://svnrepo/project project-tmp

Then examine the log of your original project folder and do the following from the project-tmp folder:

> hg transplant -s ../project 1234

Where 1234 is the revision that you want to move over. Repeat this until all your revisions are copied.

When you're done you should be able to start using the new folder in place of the old folder by re-pulling from SVN, rebasing your changes and push them back (don't forget --svn)

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