将 Subversion 存储库恢复到工作副本修订版
前几天,我的 subversion VM 死机了(主机硬件熔化),我必须恢复 vmware 服务器映像的备份副本。恢复顺利,虚拟机再次在新主机上运行。
我遇到的问题是,我恢复的存储库版本为 60,但我的 PC 上的工作副本版本为 66。当我尝试提交工作副本时,我收到以下错误消息。
svn: Commit failed (details follow):
svn: No such revision 61
强制此提交并使 subversion 达到与我的工作副本相同的修订版本的最佳方法是什么?
My subversion VM died the other day (host hardware melted) and I had to restore a backed up copy of the vmware server image. The restore went well and the VM is running again on a new host.
The problem I have is that my restored repository is at revision 60 but my working copy on my PC is at 66. When I try and commit my working copy I get the following error message.
svn: Commit failed (details follow):
svn: No such revision 61
What is the best way to force this commit and bring subversion up to the same revision as my working copy?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不认为你的旧工作副本可以“教导”新的 SVN 服务器有关缺失的修订版本 (61-66)。
我建议:
此时,新的 SVN 服务器将是最新的。
I don't think your old working copy can "teach" the new SVN server about the missing revisions (61-66).
I would suggest:
At this point the new SVN server will be up-to-date.
从恢复的存储库中进行新的签出。将现有工作副本中的更改复制到新的结账中,然后提交。
您不想复制 .svn 目录。像 rsync 这样的工具可以帮助同步到两个目录。
如果有很多差异,例如新文件和已删除文件svn_load_dirs.pl 也许可以提供帮助。
Do a fresh checkout from the restored repository. Copy the changes from your existing working copy over to the new checkout and then commit.
You do not want to copy the .svn directories. A tool like rsync can help sync to two directories.
If there are lots of differences such as new files and deleted files svn_load_dirs.pl may be able to help.
如果没有备份,这种方法比公认的恢复结账并运行的方法要快得多。此外,rsync 并不是 Windows 操作系统原生的。
另一种解决方案可能是使用 SQLLite 读取 SVN .db 文件并手动更新修订号。
参考:如何创建 SVN 版本控制在现有项目之上?
Without the backup, this approach is much faster then the accepted method for getting the checkout back up and running. Furthermore, rsync is not native to a windows OS.
An alternate solution might be possible in using SQLLite to read the SVN .db file and update the revision number manually.
Reference: How can I create SVN versioning on top of an existing project?