I was looking at the svn_apply_autoprops.py script and was hoping to
convert it to be able to use SVK as well. Unfortunately due to various
assumptions made about the ".svn" folders it wasn't a simple switch of
the command it invokes to set the properties. I decided to simply write
a new script since I realized I could simplify it significantly by using
the ConfigParser module instead of parsing the config with regular
expressions.
So, here is my new version:
http://matt-good.net/files/post-related/svn_apply_autoprops.py
Key features include:
Faster
This version is about twice as fast as the old one on the
several repositories I've tested. The old version walked the
directory structure for each pattern to find matching files.
This version uses svn status -v to find all the versioned files
once and simply scans this list to find the matching files.
Simpler
Using the ConfigParser and simplifying the directory scanning
made this new version about 1/2 the code of the old one.
SVK
There's a variable that is defined at the top of the script to
determine which command is used: svn or svk. Both support the
same arguments needed by this script and are easily
interchangeable.
--
Matthew Good <svn@matt-good.net>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Dec 25 02:08:17 2005