简体   繁体   English

单个svn:externals属性中的多个目录

[英]Multiple directories in single svn:externals property

Suppose I've got svn repository A which contains a bunch of directories: trunk/dir1 trunk/dir2 trunk/dir3 ... 假设我有一个svn存储库A,其中包含一堆目录:trunk / dir1 trunk / dir2 trunk / dir3 ...

I want to use a subset of these directories in repository B. One way to do this would be to set an svn:externals property that would just bring in all of A: A https://path/to/A/trunk . 我想在存储库B中使用这些目录的子集。执行此操作的一种方法是设置svn:externals属性,该属性将仅引入所有A: A https://path/to/A/trunk

Since I only want a subset of these directories though, I'd rather bring in just what I need. 因为我只想要这些目录的子集,所以我宁愿带进我需要的东西。 This is fine - I can set the property to only bring in say dir1 and dir2 很好-我可以将属性设置为仅输入dir1和dir2

dir1 https://path/to/A/trunk/dir1
dir2 https://path/to/A/trunk/dir2

This does what I want, and it does seem to make my checkout quicker when A contains a ton of directories I don't want. 这可以满足我的要求,并且当A包含大量我不想要的目录时,它似乎可以使我的结帐更快。 What I've noticed though is that when I go to do an svn update (particularly when nothing has actually been updated in A), this takes a lot longer since it has to check each directory listed in the svn:externals property to see if the revision has changed... when I just svn:externals in the whole trunk, the svn update is quicker because it just has to check one directory. 不过我注意到的是,当我去进行svn更新时(尤其是当A中实际上没有任何更新时),这花费了更长的时间,因为它必须检查svn:externals属性中列出的每个目录,以查看是否修订版本已更改...当我只在整个主干中使用svn:externals时,svn更新会更快,因为它只需要检查一个目录即可。

Effectively what I'm looking for is some syntax that would represent that I want multiple subdirectories but that since they're all subdirectories that svn only has to check the revision history once. 实际上,我正在寻找的某种语法表示我想要多个子目录,但是由于它们都是svn的所有子目录,因此只需检查修订历史记录一次。 Notionally, something like this: 名义上,这样的事情:

dir1,dir2 https://csdrepos/path/to/A/trunk/dir1,dir2

I can't find reference to any syntax like this... is there no way to do this? 我找不到对这种语法的引用...没有办法做到这一点? Any other tips on how I might speed up my svn updates without needing to svn:externals in the kitchen sink and slow down my initial checkout? 关于如何无需svn来加快svn更新的任何其他提示:厨房水槽中的外部设备并降低我的初始结帐速度? I can't really reorganize the directory structure of A because different repos will want a different subset of A's directories. 我无法真正重组A的目录结构,因为不同的存储库将需要A的目录的不同子集。

Taking your comment into account the most efficient solution seems to include the external in a 'special' folder (eg /ext) 考虑到您的评论,最有效的解决方案似乎是将外部文件包含在“特殊”文件夹中(例如/ ext)

Then adding symlinks to the relevant folders in /ext in the place you want. 然后将符号链接添加到所需位置/ ext中的相关文件夹。

The result is only a single 'external' download and only the relevant directories cluttering your listing in the places you want. 结果只有一次“外部”下载,并且只有相关目录在您想要的位置上使您的列表混乱。

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

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