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

Zoe
  • 27,060
  • 21
  • 118
  • 148
Leonidas
  • 2,440
  • 15
  • 22

2 Answers2

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.

David Z
  • 128,184
  • 27
  • 255
  • 279
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.

pawstrong
  • 924
  • 7
  • 17