简体   繁体   English

在externals属性中更改svn存储库URL

[英]Changing svn repository url in externals property

I'm moving my repository to a new location, but I have folders with the (same) repository URL hard-coded in the externals properties. 我正在将我的存储库移动到一个新位置,但是我的文件夹中包含在外部属性中硬编码的(相同)存储库URL。 eg: 例如:
old URL: https://OldLocation.Domain/svn/ 旧网址: https://OldLocation.Domain/svn/
new URL: https://NewLocation.Domain/svn/ 新网址: https://NewLocation.Domain/svn/

How can I change the old repository URL to the new one? 如何将旧存储库URL更改为新存储库URL? simply editing the property doesn't work. 只是编辑属性不起作用。

You should use relative externals (available since SVN 1.5): 您应该使用相对外部 (从SVN 1.5开始可用):

either use "../" as a relative to the current path or 使用“../”作为当前路径的相对或

use "^/" relative to the root of your repository. 使用相对于存储库根目录的“^ /”

You also may has to delete (or move away) the current content of the folder with the external, so that an update can write the data to disk (remember: SVN will not overwrite existing files) 您还可能必须使用外部删除(或移走)文件夹的当前内容,以便更新可以将数据写入磁盘(请记住:SVN不会覆盖现有文件)

If I understood your situation correctly, the svn:externals properties point to a URL in the same repository as the directory the properties are on. 如果我正确理解了您的情况,则svn:externals属性指向与属性所在目录相同的存储库中的URL。 That is, the location 也就是说,位置

https://OldLocation.Domain/svn/project/path/to/a/directory

has an svn:externals property pointing to 有一个svn:externals属性指向

https://OldLocation.Domain/svn/project/path/to/an/external/library

If your Subversion clients are all using version 1.5 or greater, you can replace all these externals with 如果您的Subversion客户端都使用1.5或更高版本,您可以用所有这些外部替换

^/path/to/an/external/library

where ^ means "the root of the project this directory is in". 其中^表示“此目录所在的项目的根目录”。

Then, when you move the entire repository to NewLocation.Domain , the svn:externals properties will follow and refer to NewLocation.Domain too, and your problem will be eliminated. 然后,当您将整个存储库移动到NewLocation.Domainsvn:externals属性将跟随并引用NewLocation.Domain ,您的问题将被消除。

Having said all that, I think editing the property should work (and you'll need to do it anyway to convert to the ^ format), but you may need to do some combination of deleting the locally-checked-out copy of the external, updating and committing to satisfy the svn gods. 说了这么多,我认为编辑属性应该可行(并且你还需要将其转换为^格式),但是你可能需要做一些删除本地签出的外部副本的组合,更新和承诺满足svn神。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM