tags:

views:

38

answers:

2

Hi, I'm trying to get svn to ignore got large datafiles in a directory. Since all the files in the directory share the same extention, specifying a pattern in svn:ignore doesn't do. Is there a way to say "ignore files larger than N MiB"?

+1  A: 

Put a list of the files you want to ignore (possibly using an OS tool such as find on Linux) and then do something like this:

svn propset svn:ignore "*" --targets filelist.txt
ChrisH
Not really what the OP is asking for: `"ignore files larger than N MiB"?`, perhaps the specific files can change and they're after a more general solution to ignoring large files? =)
Rob
The svn propset command does not have a built in ability to filter based on file size. Without information about what other tools the OP has available I believe this is the most general solution other than manually issuing a series of svn propset commands. The filelist.txt file can be editted/regenerated as needed.
ChrisH
+1  A: 

Essentially I would write a commandline script that iterates over all files of the desired filetype and than executes the svn propset command mentioned by @ChrisH if the filesize is bigger than the boundary you define.

If your on Windows this stackoverflow question might be helpful.

Johannes Wachter