简体   繁体   中英

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 ...

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 .

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 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. 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.

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. 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? I can't really reorganize the directory structure of A because different repos will want a different subset of A's directories.

Taking your comment into account the most efficient solution seems to include the external in a 'special' folder (eg /ext)

Then adding symlinks to the relevant folders in /ext in the place you want.

The result is only a single 'external' download and only the relevant directories cluttering your listing in the places you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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