views:

305

answers:

2

Is there a possibility to checkout from a repo based on the properties of a svn-versioned file? That would be a special kind of sparse checkout. For example to checkout only files with "svn:corelib" == "yes".

Or is the only chance just to checkout the whole repo and to delete the unwanted files later? For example with a script that pulls for each file the props with "svn propget svn:corelib" and examines the data?

(Third option would be of course just to separate the repos of the corelib-files and noncorelib-files.)

+1  A: 

From reading http://svnbook.red-bean.com/en/1.5/svn.advanced.props.html, it doesn't seem like Subversion can do that :-( You'd probably have to search all files in the repository manually to get a list of the ones with the property set and just check those out.

If it's reasonable for you to put the corelib and non-corelib files in separate repositories, or even separate directory trees within the same repository, that is almost certainly the best and most efficient solution.

David Zaslavsky
I agree. Put them into different directories, I would say, in the same repository.
A: 

You can query the properties of a file w/o checking it out. You could use this feature in a shell script which collects the names of files to check out..

Listing properties:

svn proplist http://repo/path/to/file

Fetching value of specific property:

svn propget svn:corelib http://repo/path/to/file

If you propget on a file that doesn't have the requested property, you'll get an empty string.

lucas-insasho