如何将工作副本上的更改提交到不同(但相同)的存储库?
最近这似乎一直发生在我身上。我有一个存储库“X”。该存储库有一个备份。有一天,托管存储库 X 的服务器死机了,所以我必须使用备份为我的 SVN 存储库创建一个新位置。问题是:
我在工作副本上完成了数小时的工作。当我单击“提交”时,它会尝试将更改提交到失效存储库 URL。我希望工作副本能够毫无麻烦地开始处理新的存储库 X,但是运行“switch”不起作用(“这些不是相同的存储库”)。
我通常做的是从工作副本创建补丁,检查新存储库并应用补丁。然而最近,我不断收到补丁文件中的错误和垃圾,所以我不再信任它们。对我来说最新的解决方案是创建一个全新的存储库并复制文件,丢失所有文件历史记录。
显然这是不可接受的,所以如果有人知道如何顺利且轻松地开始使用新存储库,请回复。
This seems to happen to me all the time lately. I have a repository "X". That repository has a backup. One day the server hosting repository X dies, so I have to create a new location for my SVN repository using the backup. Here is the problem:
I have hours of work done on my working copy. When I click commit, it tries to commit the changes to the dead repository URL. I want the working copy to start treating the NEW repository X without any hassle, but running "switch" doesn't work ("These are not the same repositories").
What I usually do is create a patch from the working copy, check out the new repository and apply the patch. Recently however, I keep getting errors and crap from the patch files, so I no longer trust them. The latest solution for me has been to create a whole new repository and copying the files over, losing all the file history.
Obviously this is unacceptable, so if anyone knows a way to start working with a new repository smoothly and effortlessly, please reply.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过
svn switch --relocate
?这允许您更新存储库的根 URL,而不仅仅是存储库中的路径。Have you tried
svn switch --relocate
? That allows you to update the repository's root URL, rather than just the path within the repository.