[Svnmerge] [PATCH] Cache svn output
Rich Williams
perldog at gmail.com
Tue Sep 19 08:20:32 PDT 2006
Hi,
We've started using svnmerge recently, and already it's getting pretty
slow. The attached patch speeds things up by simply caching the
output of certain svn commands (the ones which work on specific
revisions, not the ones which are fetching information about the
current state)
Here's what the patch does - in 'get_svninfo', I use the UUID of the
repository to create a 'shelf' in ~/.subversion/svnmerge-cache (it also
checks that subsequent calls to 'get_svninfo' find the same UUID).
Then, in 'launch', if the (new) 'cache' parameter is True, I check the
shelf for a matching command, and if it has one, I return that. If not
then it runs the command and stores the result in the shelf.
I then added the appropriate cache=True extra arguments to the
various calls to 'launchsvn' and 'svn_command' where the command
output could be cached.
Disclaimer - I really don't know Python very well, so this might not be
the 'right' way to do what I've done. The change is fairly contained
so hopefully it could be tidied up and made useful to everyone. I've
not tested it on anything other than Linux with Python 2.4.3.
Have fun,
Rich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff.svnmerge
Type: application/octet-stream
Size: 4840 bytes
Desc: not available
URL: </pipermail/svnmerge/attachments/20060919/86d63948/attachment-0002.obj>
More information about the Svnmerge
mailing list