Mercurial > hgsubversion
comparison tests/test_util.py @ 944:d6db289f1548
pull: add hgsubversion.filestoresize to control memory consumption
The configuration entry defines the size of the replay or stupid edited
file store, that is the maximum amount of edited files data in megabytes
which can be kept in memory before falling back to storing it in a
temporary directory. Default to 200 (megabytes), use -1 to disable.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Fri, 28 Sep 2012 21:43:50 +0200 |
parents | 5bacb9c63e3e |
children | 9c3b4f59e7e6 |
comparison
equal
deleted
inserted
replaced
943:c49c3c418f9d | 944:d6db289f1548 |
---|---|
331 # it seems to work | 331 # it seems to work |
332 for entry in tarball: | 332 for entry in tarball: |
333 tarball.extract(entry, path) | 333 tarball.extract(entry, path) |
334 return path | 334 return path |
335 | 335 |
336 def fetch(self, repo_path, subdir=None, stupid=False, layout='auto', startrev=0, | 336 def fetch(self, repo_path, subdir=None, stupid=False, layout='auto', |
337 externals=None, noupdate=True, dest=None, rev=None): | 337 startrev=0, externals=None, noupdate=True, dest=None, rev=None, |
338 config=None): | |
338 if layout == 'single': | 339 if layout == 'single': |
339 if subdir is None: | 340 if subdir is None: |
340 subdir = 'trunk' | 341 subdir = 'trunk' |
341 elif subdir is None: | 342 elif subdir is None: |
342 subdir = '' | 343 subdir = '' |
355 cmd.append('--stupid') | 356 cmd.append('--stupid') |
356 if noupdate: | 357 if noupdate: |
357 cmd.append('--noupdate') | 358 cmd.append('--noupdate') |
358 if rev is not None: | 359 if rev is not None: |
359 cmd.append('--rev=%s' % rev) | 360 cmd.append('--rev=%s' % rev) |
361 config = dict(config or {}) | |
360 if externals: | 362 if externals: |
361 cmd[:0] = ['--config', 'hgsubversion.externals=%s' % externals] | 363 config['hgsubversion.externals'] = str(externals) |
364 for k,v in reversed(sorted(config.iteritems())): | |
365 cmd[:0] = ['--config', '%s=%s' % (k, v)] | |
362 | 366 |
363 dispatch(cmd) | 367 dispatch(cmd) |
364 | 368 |
365 return hg.repository(testui(), self.wc_path) | 369 return hg.repository(testui(), self.wc_path) |
366 | 370 |