convert/cvs: add an option to disable remote log caching
Useful for debugging or testing when using --tmpdir.
--- 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