[PATCH 0 of 3] convert: Built-in cvsps for hg cvs import (6).

Patrick Mézard pmezard at gmail.com
Sat Jun 7 08:52:11 CDT 2008


Frank A. Kingswood a écrit :
> Frank Kingswood wrote:
>> convert: Built-in cvsps for hg cvs import.
>>
>> This patch adds a built-in cvsps replacement.
>> This sixth adds two testcases for the builtin cvsps code.
> 
> This patch is unchanged from the 20080424 version, with the exception of 
> adding two test cases as suggested on IRC.
> 
> Builtin CVSPS has proved stable and has not shown any errors in the 
> month that I have been using it on my fairly large (gigabyte, 25000 
> changesets) CVS repository, and on a few (smaller) public repositories.
> 
> I have requested users of CVS and Mercurial to check it out, and 
> received a few replies on the mailing lists, none finding any errors. 
> Now would be a good time to merge into crew, to facilitate additional 
> testing.

Good work.

I have not really used it but given the amount of work you put in and the overall feedback, I am for the inclusion in Mercurial if the following points are resolved:

1- Coding style is incorrect in cvs.py, I will annotate the message.

2- Coding style of cvsps and cvsps.py do not follow Mercurial style (same remarks as in [1]). I find it annoying but won't fight against it if others are OK with it. What's blocking for me is the identation, I dislike having one differing from the python standard of 4 spaces per tab. Not everybody is a wizard at editor configuration, it's good to follow this convention.

3- The new tests do not pass under Windows, the error output is copied below. I did not have the time to dig it yet, and I did not run it out of the customized test-suite, so it may be a side-effect of it. If you did use it successfully under Windows, just tell me, I will try harder. This is important because cvsps can be used through cygwin and having a python version working under Windows is another strong argument in favor of the inclusion of your code.

"""
WARNING: Did not find prerequisite tool: gunzip.exe
WARNING: cannot run tests with timeouts

ERROR: test-convert-cvs-branch output changed
--- Expected output 
+++ Test output 
@@ -21,6 +21,10 @@
 cvs commit: Examining .
 checking in src/a,v
 % Convert
+cvs server: cvs checkout: cannot find module `src/c:\docume~1\trick\locals~1\temp\hgtests.qjk7mu\test-convert-cvs-branch\cvsrepo/src/a' - ignored
+
+abort: unknown CVS response: error  
+
 assuming destination src-hg
 initializing destination src-hg repository
 using builtin cvsps
@@ -33,21 +37,4 @@
 sorting...
 converting...
 4 Initial revision
-3 init
-2 mod a
-1 mod b
-0 mod a again
-updating tags
 % Check the result
-o  5 () update tags files: .hgtags
-|
-| o  4 (BRANCH) mod a again files: a
-| |
-| o  3 (BRANCH) mod b files: b
-| |
-| o  2 (BRANCH) mod a files: a
-| |
-| o  1 (v0) init files:
-|/
-o  0 () Initial revision files: a b
-
.
ERROR: test-convert-cvs-builtincvsps output changed
--- Expected output 
+++ Test output 
@@ -12,6 +12,10 @@
 % commit a new revision changing b/c
 checking in src/b/c,v
 % convert fresh repo
+cvs server: cvs checkout: cannot find module `src/c:\docume~1\trick\locals~1\temp\hgtests.qjk7mu\test-convert-cvs-builtincvsps\cvsrepo/src/a' - ignored
+
+abort: unknown CVS response: error  
+
 initializing destination src-hg repository
 using builtin cvsps
 collecting CVS rlog
@@ -23,12 +27,6 @@
 sorting...
 converting...
 2 Initial revision
-1 import
-0 ci0
-updating tags
-a
-c
-c
 % convert fresh repo with --filemap
 initializing destination src-filemap repository
 using builtin cvsps
@@ -42,18 +40,15 @@
 converting...
 2 Initial revision
 1 import
-rolling back last transaction
 0 ci0
-updating tags
-c
-c
-2 update tags files: .hgtags
-1 ci0 files: b/c
-0 Initial revision files: b/c
 % commit new file revisions
 checking in src/a,v
 checking in src/b/c,v
 % convert again
+cvs server: cvs checkout: cannot find module `src/c:\docume~1\trick\locals~1\temp\hgtests.qjk7mu\test-convert-cvs-builtincvsps\cvsrepo/src/a' - ignored
+
+abort: unknown CVS response: error  
+
 using builtin cvsps
 collecting CVS rlog
 7 log entries
@@ -63,12 +58,7 @@
 scanning source...
 sorting...
 converting...
-0 ci1
-a
-a
-c
-c
-c
+3 Initial revision
 % convert again with --filemap
 using builtin cvsps
 collecting CVS rlog
@@ -80,19 +70,16 @@
 sorting...
 converting...
 0 ci1
-c
-c
-c
-3 ci1 files: b/c
-2 update tags files: .hgtags
-1 ci0 files: b/c
-0 Initial revision files: b/c
 % commit branch
 U b/c
 T a
 T b/c
 checking in src/b/c,v
 % convert again
+cvs server: cvs checkout: cannot find module `src/c:\docume~1\trick\locals~1\temp\hgtests.qjk7mu\test-convert-cvs-builtincvsps\cvsrepo/src/a' - ignored
+
+abort: unknown CVS response: error  
+
 using builtin cvsps
 collecting CVS rlog
 8 log entries
@@ -102,11 +89,7 @@
 scanning source...
 sorting...
 converting...
-0 ci2
-a
-a
-c
-d
+4 Initial revision
 % convert again with --filemap
 using builtin cvsps
 collecting CVS rlog
@@ -118,22 +101,3 @@
 sorting...
 converting...
 0 ci2
-c
-d
-4 ci2 files: b/c
-3 ci1 files: b/c
-2 update tags files: .hgtags
-1 ci0 files: b/c
-0 Initial revision files: b/c
-o  5 (branch) ci2 files: b/c
-|
-| o  4 () ci1 files: a b/c
-| |
-| o  3 () update tags files: .hgtags
-| |
-| o  2 () ci0 files: b/c
-|/
-| o  1 (INITIAL) import files:
-|/
-o  0 () Initial revision files: a b/c
-
.
Failed test-convert-cvs-branch: output changed
Failed test-convert-cvs-builtincvsps: output changed
# Ran 2 tests, 0 skipped, 2 failed.
"""

4- (non-blocking) the cvs.py and cvs patches can be merged IMHO.

--
Patrick Mézard


More information about the Mercurial-devel mailing list