SVN Switch Relocate - 不是存储库的根目录
我正在尝试将工作副本文件夹从旧的专用 svn 服务器移动到新的 svn 服务器,其中包含子文件夹。使用以下重新定位命令:
svn switch --relocate https://oldserver/svn/repos https://newserver/some/directory
我得到:
svn: 'https://newserver/some/directory ' is not the root of the repository
哪个是正确的......但是,呃,无论如何,我如何移动位置?
I'm trying to move a working copy folder from it's old dedicated svn server, to a new svn server where it is contained within a sub-folder. Using the following relocate command:
svn switch --relocate https://oldserver/svn/repos https://newserver/some/directory
I get:
svn: 'https://newserver/some/directory ' is not the root of the repository
Which is correct ..... but, err, how do I move the location regardless?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
也可能发生的情况是您正在对根的子级进行重新定位。
尝试在根文件夹上进行重新定位。所有子文件夹也将自动重新定位。
What can happen too is that you are doing the relocate on a child of the root.
Try to do a relocate on the root folder. All the children folders will be automatically relocated too.
好吧,我假设您实际上已经通过 svnadmin dump/svnadmin load 迁移了存储库,因此在这种情况下您可以尝试: svn switch --relocate https://newserver /some/directory 如果您遇到相同的错误,您实际上可能只需执行一个新的
svn co
。我不记得曾经遇到过这个错误,但是我的所有存储库都使用像您要移动到的那样的嵌套结构,因此我可能从未需要处理它:-)Well im assuming youve already actually migrated the repository via
svnadmin dump
/svnadmin load
so in that case you could try:svn switch --relocate https://newserver/some/directory
If you get the same error you might actually have to just do a newsvn co
. I dont recall ever coming across that error but then all my repos use a nested structure like the one youre moving to so its possible ive never had to deal with it :-)据我了解,您不能使用
svn switch
(带或不带--relocate
)移动到新存储库。这样想:你的新存储库的 HEAD 修订版是 x,你的旧存储库的修订版是 y,那么 SVN 应该如何处理工作副本的基本修订版呢?svn help switch
表示--relocate
用于:由于情况并非如此,恐怕您必须执行新的签出。
As far as I understand, you can't use
svn switch
(with or without--relocate
) to move to a new repository. Think about it this way: your new repository's HEAD revision is x, your old repository's revision is y, so what is SVN supposed to do with the working copy's base revision?svn help switch
says that--relocate
is used to:Since this is not the case, I'm afraid you'll have to perform a fresh checkout.
我尝试了相同的操作,在这种情况下,我在 file: url 中有一个使用 svnsync 的副本,并使用 mv /home/me/sync/therepo /home/me/sync/repos/therepo 移动它。
原因:我的同步目录中有几个帮助脚本,它们扰乱了存储库的视图。
svn switch --relocate 在大多数情况下都有效,除了不断抱怨的外部。
解决方案很残酷:我删除了(rm -rf)其中包含有问题文件的目录,并再次运行 svn update 以重新获取外部文件。
至少这样我就不用再次进行大额结账了。
另外,现在当我们稍后将 svn 服务器移动到新机器时,我可以为我的同事编写说明。
I tried the same operation, in this case I had a copy using svnsync in a file: url and moved it using mv /home/me/sync/therepo /home/me/sync/repos/therepo.
The reason: I have several help scripts in the sync catalog that mess up the view of the repos.
svn switch --relocate worked for the most part, except externals that keep complaining.
The solution was brutal: I deleted (rm -rf) the directories with the offending files in them and ran svn update again to refetch the externals.
At least this way I did not have to do the large checkout again.
Also, now I can write instructions for my coworkers when we move the svn server to a new machine later on.