Mercurial > hgsubversion
comparison hgsubversion/svnwrap/subvertpy_wrapper.py @ 1561:b303c9414190 1.9.1
subvertpy: same tweak to fsfs configuration as in swig
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sat, 24 Mar 2018 18:23:08 -0400 |
parents | dee572a4e30b |
children |
comparison
equal
deleted
inserted
replaced
1560:0099cf9a9a8b | 1561:b303c9414190 |
---|---|
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 |
53 return (svnvers, 'Subvertpy ' + _versionstr(subvertpy.__version__)) | 54 return (svnvers, 'Subvertpy ' + _versionstr(subvertpy.__version__)) |
54 | 55 |
55 def create_and_load(repopath, dumpfd): | 56 def create_and_load(repopath, dumpfd): |
56 ''' create a new repository at repopath and load the given dump into it ''' | 57 ''' create a new repository at repopath and load the given dump into it ''' |
57 repo = repos.create(repopath) | 58 repo = repos.create(repopath) |
59 | |
60 with open(os.path.join(repopath, 'db', 'fsfs.conf'), 'w') as f: | |
61 f.write(textwrap.dedent("""\ | |
62 # config settings for svn repos to try and speed up the testsuite | |
63 [rep-sharing] | |
64 enable-rep-sharing = false | |
65 [deltification] | |
66 enable-dir-deltification = false | |
67 enable-props-deltification = false | |
68 [compression] | |
69 compression-level=1 | |
70 """)) | |
58 | 71 |
59 nullfd = open(os.devnull, 'w') | 72 nullfd = open(os.devnull, 'w') |
60 | 73 |
61 try: | 74 try: |
62 repo.load_fs(dumpfd, nullfd, repos.LOAD_UUID_FORCE) | 75 repo.load_fs(dumpfd, nullfd, repos.LOAD_UUID_FORCE) |