Mercurial > hgsubversion
view tests/fixtures/spaces-in-path.sh @ 889:7a98fbadcae9
revsets: huge speedups for fromsvn and svnrev
I have a hgsubversion repo that contains over 300,000 commits.
In that repo, this patch improves performance as follows:
hg --time log -r 'first(fromsvn())'
Before: 40.3 sec
After: 0.8 sec
hg --time log -r 'svnrev(350000)'
Before: 40.3 sec
After: 0.1 sec
Note: the performance of these revset implementations is very sensitive
to doing as little work as possible per line of the rev_map file.
I originally attempted to hide the file format details by hoisting the
parsing of each line up into RevMap.readmapfile, but the current less
abstract code is dramatically (10x or more) faster.
If the revmap file is missing, we error out and print a message
describing what to do.
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Sat, 12 May 2012 05:38:34 -0700 |
parents | a739568f8d48 |
children |
line wrap: on
line source
#!/bin/sh mkdir temp cd temp svnadmin create repo svn co file://`pwd`/repo wc cd wc mkdir branches trunk tags mkdir tags/versions mkdir tags/blah svn add * svn ci -m 'btt' cd trunk for a in alpha beta gamma delta ; do echo $a > $a svn add $a done svn ci -m 'Add files.' echo 'foo bar' > 'foo bar' svn add 'foo bar' svn ci -m 'Add files.' mkdir 'blah blah' echo 'another file' > 'blah blah/another file' svn add 'blah blah' svn ci -m 'Add files.' cd .. svn up svn cp trunk branches/dev_branch svn ci -m 'Make a branch' cd ../.. svnadmin dump temp/repo > spaces-in-path.svndump echo echo 'Complete.' echo 'You probably want to clean up temp now.' echo 'Dump in spaces-in-path.svndump' exit 0