comparison hgsubversion/svnwrap/svn_swig_wrapper.py @ 1559:d717b4de5f1e

svnwrap: configure fsfs.conf when using swig bindings By disabling a few features of fsfs, I'm able to speed tests up from 275 seconds to 250 seconds. Still too slow, but I won't complain about a nearly 10% improvement either.
author Augie Fackler <raf@durin42.com>
date Sat, 24 Mar 2018 17:16:08 -0400
parents e31c288e5059
children
comparison
equal deleted inserted replaced
1558:ae572c9be4e6 1559:d717b4de5f1e
2 import errno 2 import errno
3 import os 3 import os
4 import shutil 4 import shutil
5 import sys 5 import sys
6 import tempfile 6 import tempfile
7 import textwrap
7 import urllib 8 import urllib
8 import collections 9 import collections
9 10
10 import common 11 import common
11 12
39 40
40 def create_and_load(repopath, dumpfd): 41 def create_and_load(repopath, dumpfd):
41 ''' create a new repository at repopath and load the given dump into it ''' 42 ''' create a new repository at repopath and load the given dump into it '''
42 pool = core.Pool() 43 pool = core.Pool()
43 r = repos.svn_repos_create(repopath, '', '', None, None, pool) 44 r = repos.svn_repos_create(repopath, '', '', None, None, pool)
45 with open(os.path.join(repopath, 'db', 'fsfs.conf'), 'w') as f:
46 f.write(textwrap.dedent("""\
47 # config settings for svn repos to try and speed up the testsuite
48 [rep-sharing]
49 enable-rep-sharing = false
50 [deltification]
51 enable-dir-deltification = false
52 enable-props-deltification = false
53 [compression]
54 compression-level=1
55 """))
44 56
45 try: 57 try:
46 repos.svn_repos_load_fs2(r, dumpfd, None, 58 repos.svn_repos_load_fs2(r, dumpfd, None,
47 repos.svn_repos_load_uuid_force, 59 repos.svn_repos_load_uuid_force,
48 '', False, False, None, pool) 60 '', False, False, None, pool)