Show More
@@ -306,6 +306,7 b' class DbManage(object):' | |||
|
306 | 306 | and disables dotencode |
|
307 | 307 | """ |
|
308 | 308 | settings_model = SettingsModel(sa=self.sa) |
|
309 | from rhodecode.lib.vcs.backends.hg import largefiles_store | |
|
309 | 310 | |
|
310 | 311 | # Build HOOKS |
|
311 | 312 | hooks = [ |
@@ -336,12 +337,12 b' class DbManage(object):' | |||
|
336 | 337 | self.sa.add(largefiles) |
|
337 | 338 | |
|
338 | 339 | # set default largefiles cache dir, defaults to |
|
339 |
# /repo |
|
|
340 | # /repo_store_location/.cache/largefiles | |
|
340 | 341 | largefiles = RhodeCodeUi() |
|
341 | 342 | largefiles.ui_section = 'largefiles' |
|
342 | 343 | largefiles.ui_key = 'usercache' |
|
343 |
largefiles.ui_value = |
|
|
344 | 'largefiles') | |
|
344 | largefiles.ui_value = largefiles_store(repo_store_path) | |
|
345 | ||
|
345 | 346 | self.sa.add(largefiles) |
|
346 | 347 | |
|
347 | 348 | # enable hgsubversion disabled by default |
@@ -21,6 +21,7 b'' | |||
|
21 | 21 | """ |
|
22 | 22 | HG module |
|
23 | 23 | """ |
|
24 | import os | |
|
24 | 25 | import logging |
|
25 | 26 | |
|
26 | 27 | from rhodecode.lib.vcs import connection |
@@ -46,3 +47,10 b' def discover_hg_version(raise_on_exc=Fal' | |||
|
46 | 47 | if raise_on_exc: |
|
47 | 48 | raise |
|
48 | 49 | return '' |
|
50 | ||
|
51 | ||
|
52 | def largefiles_store(base_location): | |
|
53 | """ | |
|
54 | Return a largefile store relative to base_location | |
|
55 | """ | |
|
56 | return os.path.join(base_location, '.cache', 'largefiles') |
@@ -92,6 +92,9 b' class DBBackend(object):' | |||
|
92 | 92 | def __init__( |
|
93 | 93 | self, config_file, db_name=None, basetemp=None, |
|
94 | 94 | connection_string=None): |
|
95 | ||
|
96 | from rhodecode.lib.vcs.backends.hg import largefiles_store | |
|
97 | ||
|
95 | 98 | self.fixture_store = os.path.join(self._store, self._type) |
|
96 | 99 | self.db_name = db_name or self._base_db_name |
|
97 | 100 | self._base_ini_file = config_file |
@@ -99,6 +102,7 b' class DBBackend(object):' | |||
|
99 | 102 | self.stdout = '' |
|
100 | 103 | self._basetemp = basetemp or tempfile.gettempdir() |
|
101 | 104 | self._repos_location = os.path.join(self._basetemp, 'rc_test_repos') |
|
105 | self._repos_hg_largefiles_store = largefiles_store(self._basetemp) | |
|
102 | 106 | self.connection_string = connection_string |
|
103 | 107 | |
|
104 | 108 | @property |
@@ -154,6 +158,9 b' class DBBackend(object):' | |||
|
154 | 158 | self._type, destroy=True) as _ini_file: |
|
155 | 159 | if not os.path.isdir(self._repos_location): |
|
156 | 160 | os.makedirs(self._repos_location) |
|
161 | if not os.path.isdir(self._repos_hg_largefiles_store): | |
|
162 | os.makedirs(self._repos_hg_largefiles_store) | |
|
163 | ||
|
157 | 164 | self.execute( |
|
158 | 165 | "paster setup-rhodecode {0} --user=marcink " |
|
159 | 166 | "--email=marcin@rhodeocode.com --password={1} " |
General Comments 0
You need to be logged in to leave comments.
Login now