简体   繁体   English

通过命令行将值列表添加到SVN:externals

[英]Adding a list of values to SVN:externals via command line

I am trying to create an automated script that will create a tag and then update the svn:externals property for me automatically. 我试图创建一个自动化的脚本,将创建一个标签,然后更新了svn:自动的外部财产给我。 At the moment I am having issue trying to set the full list. 目前,我有问题想设置的完整列表。 I can set an single property by using 我可以使用设置单个属性

svn propset svn:externals "external1 http://svn/repos/tags/external1" .\tag_name

The issue is if you run that multiple times (we have 10 or so externals on the tag) then it will only set the last instance. 问题是,如果你运行多次(我们必须在标签上10层左右的外部),那么它只会设置的最后一个实例。 I tried a few ways to set this with a list but had no luck 我尝试了几种方法来设置列表,但没有运气

svn propset svn:externals "external1 http://svn/repos/tags/external1" .\\tag_name "external2 http://svn/repos/tags/external2" .\\tag_name

svn propset svn:externals "external1 http://svn/repos/tags/external1 external2 http://svn/repos/tags/external2" .\\tag_name

svn propset svn:externals "external1 http://svn/repos/tags/external1,external2 http://svn/repos/tags/external2" .\\tag_name

I also tried looking at svn propedit but I didn't have any luck there. 我也尝试查看svn propedit,但那里没有运气。 If anyone has done this before your help would be greatly appreciated. 如果之前有人已经这样做了你的帮助,将不胜感激。

You can define all of your externals in a single file, then set the property with svn propset svn:externals -f YOURFILE .\\tag_name The contents of YOURFILE should look like this: 您可以在一个文件中定义所有外部对象,然后使用svn propset svn:externals -f YOURFILE .\\tag_name设置svn propset svn:externals -f YOURFILE .\\tag_name的内容应如下所示:

external1 http://svn/repos/tags/external1
external2 http://svn/repos/tags/external2

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

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