Mercurial > hg-stable
changeset 8169:6584953be356
convert/cvs: add an option to disable remote log caching
Useful for debugging or testing when using --tmpdir.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 26 Apr 2009 16:30:37 +0200 |
parents | 8766fee6f225 |
children | 6c4fdde87f90 |
files | hgext/convert/__init__.py hgext/convert/cvs.py tests/test-convert-cvs-branch tests/test-convert.out |
diffstat | 4 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/__init__.py Sun Apr 26 14:49:49 2009 +0200 +++ b/hgext/convert/__init__.py Sun Apr 26 16:30:37 2009 +0200 @@ -123,6 +123,9 @@ Internal cvsps is selected by setting --config convert.cvsps=builtin and has a few more configurable options: + --config convert.cvsps.cache=True (boolean) + Set to False to disable remote log caching, for testing and + debugging purposes. --config convert.cvsps.fuzz=60 (integer) Specify the maximum time (in seconds) that is allowed between commits with identical user and log message in a
--- a/hgext/convert/cvs.py Sun Apr 26 14:49:49 2009 +0200 +++ b/hgext/convert/cvs.py Sun Apr 26 16:30:37 2009 +0200 @@ -67,7 +67,10 @@ # builtin cvsps code self.ui.status(_('using builtin cvsps\n')) - db = cvsps.createlog(self.ui, cache='update') + cache = 'update' + if not self.ui.configbool('convert', 'cvsps.cache', True): + cache = None + db = cvsps.createlog(self.ui, cache=cache) db = cvsps.createchangeset(self.ui, db, fuzz=int(self.ui.config('convert', 'cvsps.fuzz', 60)), mergeto=self.ui.config('convert', 'cvsps.mergeto', None),
--- a/tests/test-convert-cvs-branch Sun Apr 26 14:49:49 2009 +0200 +++ b/tests/test-convert-cvs-branch Sun Apr 26 16:30:37 2009 +0200 @@ -14,6 +14,7 @@ echo "graphlog = " >> $HGRCPATH echo "[convert]" >> $HGRCPATH echo "cvsps=builtin" >> $HGRCPATH +echo "cvsps.cache=0" >> $HGRCPATH echo % create cvs repository mkdir cvsrepo
--- a/tests/test-convert.out Sun Apr 26 14:49:49 2009 +0200 +++ b/tests/test-convert.out Sun Apr 26 16:30:37 2009 +0200 @@ -108,6 +108,9 @@ Internal cvsps is selected by setting --config convert.cvsps=builtin and has a few more configurable options: + --config convert.cvsps.cache=True (boolean) + Set to False to disable remote log caching, for testing and + debugging purposes. --config convert.cvsps.fuzz=60 (integer) Specify the maximum time (in seconds) that is allowed between commits with identical user and log message in a