在没有 --svn 的情况下 Rebase 后修复 HgSubversion 存储库
我已经愉快地使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该能够执行“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.
我尝试使用
transplant
扩展来解决此问题:例如 - 修复名为
project
的hgsubversion
存储库:然后检查原始项目文件夹的日志,然后从
project-tmp
文件夹执行以下操作:其中
1234
是您要移动的修订版本。重复此操作,直到复制所有修订。完成后,您应该能够开始使用新文件夹来代替旧文件夹,方法是从 SVN 重新拉取,重新调整您的更改并将其推回(不要忘记 --svn)
I'd try using the
transplant
extension to fix this:For example - fixing an
hgsubversion
repo calledproject
:Then examine the log of your original project folder and do the following from the
project-tmp
folder: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)