SVN Switch Relocate - 不是存储库的根目录

发布于 2024-08-19 11:05:27 字数 330 浏览 6 评论 0原文

我正在尝试将工作副本文件夹从旧的专用 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 技术交流群。

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

发布评论

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

评论(4

左秋 2024-08-26 11:05:28

也可能发生的情况是您正在对根的子级进行重新定位。

尝试在根文件夹上进行重新定位。所有子文件夹也将自动重新定位。

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.

陌伤浅笑 2024-08-26 11:05:28

好吧,我假设您实际上已经通过 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 new svn 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 :-)

月亮是我掰弯的 2024-08-26 11:05:27

据我了解,您不能使用 svn switch (带或不带 --relocate)移动到新存储库。这样想:你的新存储库的 HEAD 修订版是 x,你的旧存储库的修订版是 y,那么 SVN 应该如何处理工作副本的基本修订版呢?

svn help switch 表示 --relocate 用于:

重写工作副本 URL 元数据以反映仅语法更改。当存储库的根 URL 更改(例如方案或主机名更改)但您的工作副本仍然反映相同的情况时,将使用此选项同一存储库中的目录。

由于情况并非如此,恐怕您必须执行新的签出。

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:

Rewrite working copy URL metadata to reflect a syntactic change only. This is used when repository's root URL changes (such as a scheme or hostname change) but your working copy still reflects the same directory within the same repository.

Since this is not the case, I'm afraid you'll have to perform a fresh checkout.

提笔书几行 2024-08-26 11:05:27

我尝试了相同的操作,在这种情况下,我在 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.

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