# HG changeset patch # User Patrick Mezard # Date 1240756237 -7200 # Node ID 6584953be3561f7072a81bafbf1b1cf0499e89d4 # Parent 8766fee6f2250a1343fb36ef424d34d6dff363d6 convert/cvs: add an option to disable remote log caching Useful for debugging or testing when using --tmpdir. diff -r 8766fee6f225 -r 6584953be356 hgext/convert/__init__.py --- 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 diff -r 8766fee6f225 -r 6584953be356 hgext/convert/cvs.py --- 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), diff -r 8766fee6f225 -r 6584953be356 tests/test-convert-cvs-branch --- 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 diff -r 8766fee6f225 -r 6584953be356 tests/test-convert.out --- 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