[Svnmerge] [PATCH] Improve speed of svnmerge in common paths

Giovanni Bajo rasky at develer.com
Fri May 12 10:14:19 PDT 2006


------------------------------------------------------------------------
r19625 | giovannibajo | 2006-05-12 18:31:05 +0200 (ven, 12 mag 2006) | 22
lines

Speedup common paths in svnmerge.py using the Repository Root information
returned by "svn info" even on local paths since SVN 1.3.

svnmerge.py needs to compute the repository root several times. Right now
the flow of code is very contorted, and I plan to clean it up so that it
computes it once and reuse it everywhere (instead of relying on
memoization).
Anyway, this path cleans up many paths of code so to request the repository
root through a local path when possible, so that it can be computed without
remote access.

 * contrib/client-side/svnmerge.py:
   (get_repo_root): Instead of converting immediately to URL, try running
   "svn info" on a local directory before, since it is faster.
   (url_to_rlpath): Rename to...
   (target_to_rlpath): New function. Accepts both an URL and a local
directory,
   and convert it to repository-relative path. If a local directory is
   provided (and the client is at least 1.3), this can be done without any
   remote access.
   (RevisionLog.__init__, get_copyfrom, get_default_head, analyze_head_revs,
   main): Use target_to_rlpath, and provide a local directory instead of
   an URL when available.

-- 
Giovanni Bajo
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: svnmerge.patch
Url: /pipermail/svnmerge/attachments/20060512/933ce69d/attachment.txt 


More information about the Svnmerge mailing list