tags:

views:

168

answers:

3

Imagine a repository with many kind of files. Then, I want to get from this repository just some kind of files in a "filter process".

I mean ALL FILES are versioned. But to my local work, I just wanna i.e get *.php files, ignoring download *.jpg instead.

I think about client-site hook script (pre-update). Anyone know if is it possible?

Thanks!

A: 

Are you trying to export specific files from your working copy? Or trying to create a working copy with only certain file types?

Claude
I'm trying to create a working copy with only certain file types.We have repositories with 300MB including PHP, PSD, JPG, ... A progamer just need to download from repository to his working place PHP, JS and HTML files... But a designer needs to download PSD instead.Thanks!
There is no way to checkout a partial repository. I suggest you reorganize your repo to separate your sources from publishable assets.
Claude
Wrong. See "sparse checkout."
Michael Hackner
Sorry Michael a shallow checkout won't do what DrLuk is asking. It only works on directory depths and not on extensions.
Claude
A: 

You can checkout individual directories from svn. If you put all your images in a directory svn/trunk/images and all source code in svn/trunk/php people can checkout the trees separately.

Maybe you could add soft-links to link to these files.

ko-dos
A: 

Yes, this can be done easily using TortoiseSVN.

You can create a working copy with depth = empty first. Then, using the repo browser, open the directory that contains the files you want. You can multi-select the desired files (if they are all files of the same type, you can sort by extension first to make it easier), then right-click and select "Update item to revision".

This will pull down only the selected files into your working copy, and nothing else.

Michael Hackner
This assumes a user is running TortoiseSVN or some tool with a UI to browse the repository. On a large repo a user will be forced to navigate to directory, select and update multiple times. Not good.
Claude