0

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

2 Answers 2

1

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.

1
  • 1
    I agree. Put them into different directories, I would say, in the same repository.
    – Frank
    Feb 11, 2009 at 3:11
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.