convert: make built-in cvsps the default
authorPatrick Mezard <pmezard@gmail.com>
Wed, 15 Oct 2008 20:14:28 +0200
changeset 7101 e786192d995d
parent 7100 baf12d52add4
child 7103 7a19053e4bfc
convert: make built-in cvsps the default Reviewed by Frank Kingswood <frank@kingswood-consulting.co.uk>
hgext/convert/__init__.py
hgext/convert/cvs.py
tests/test-convert-cvs
tests/test-convert.out
--- a/hgext/convert/__init__.py	Wed Oct 15 16:27:36 2008 +0200
+++ b/hgext/convert/__init__.py	Wed Oct 15 20:14:28 2008 +0200
@@ -104,11 +104,12 @@
     sandbox is ignored.
 
     Because CVS does not have changesets, it is necessary to collect
-    individual commits to CVS and merge them into changesets. CVS source
-    can use the external 'cvsps' program (this is a legacy option and may
-    be removed in future) or use its internal changeset merging code.
-    External cvsps is default, and options may be passed to it by setting
-        --config convert.cvsps='cvsps -A -u --cvs-direct -q'
+    individual commits to CVS and merge them into changesets. CVS
+    source uses its internal changeset merging code by default but can
+    be configured to call the external 'cvsps' program by setting:
+        --config convert.cvsps=cvsps -A -u --cvs-direct -q
+    This is a legacy option and may be removed in future.
+
     The options shown are the defaults.
 
     Internal cvsps is selected by setting
--- a/hgext/convert/cvs.py	Wed Oct 15 16:27:36 2008 +0200
+++ b/hgext/convert/cvs.py	Wed Oct 15 20:14:28 2008 +0200
@@ -17,7 +17,7 @@
             raise NoRepo("%s does not look like a CVS checkout" % path)
 
         checktool('cvs')
-        self.cmd = ui.config('convert', 'cvsps', 'cvsps -A -u --cvs-direct -q')
+        self.cmd = ui.config('convert', 'cvsps', 'builtin')
         cvspsexe = self.cmd.split(None, 1)[0]
         self.builtin = cvspsexe == 'builtin'
 
--- a/tests/test-convert-cvs	Wed Oct 15 16:27:36 2008 +0200
+++ b/tests/test-convert-cvs	Wed Oct 15 20:14:28 2008 +0200
@@ -12,8 +12,12 @@
     hg --cwd src-hg cat -r tip "$1"
 }
 
+# Test legacy configuration with external cvsps
 echo "[extensions]" >> $HGRCPATH
 echo "convert = " >> $HGRCPATH
+echo "graphlog = " >> $HGRCPATH
+echo "[convert]" >> $HGRCPATH
+echo "cvsps=cvsps -A -u --cvs-direct -q" >> $HGRCPATH
 
 echo % create cvs repository
 mkdir cvsrepo
@@ -96,6 +100,4 @@
 hg convert --filemap filemap src src-filemap | sed -e 's/connecting to.*cvsrepo/connecting to cvsrepo/g'
 hgcat b/c
 hg -R src-filemap log --template '#rev# #desc# files: #files#\n'
-
-echo "graphlog = " >> $HGRCPATH
 hg -R src-hg glog --template '#rev# (#branches#) #desc# files: #files#\n'
--- a/tests/test-convert.out	Wed Oct 15 16:27:36 2008 +0200
+++ b/tests/test-convert.out	Wed Oct 15 20:14:28 2008 +0200
@@ -91,11 +91,12 @@
     sandbox is ignored.
 
     Because CVS does not have changesets, it is necessary to collect
-    individual commits to CVS and merge them into changesets. CVS source
-    can use the external 'cvsps' program (this is a legacy option and may
-    be removed in future) or use its internal changeset merging code.
-    External cvsps is default, and options may be passed to it by setting
-        --config convert.cvsps='cvsps -A -u --cvs-direct -q'
+    individual commits to CVS and merge them into changesets. CVS
+    source uses its internal changeset merging code by default but can
+    be configured to call the external 'cvsps' program by setting:
+        --config convert.cvsps=cvsps -A -u --cvs-direct -q
+    This is a legacy option and may be removed in future.
+
     The options shown are the defaults.
 
     Internal cvsps is selected by setting