[PATCH] convert: fix cvsnt mergepoint referring synthetic parent

Greg Ward greg-hg at gerg.ca
Sat Jun 6 15:02:56 CDT 2009


On Sat, Jun 6, 2009 at 7:46 AM, Henrik Stuart<hg at hstuart.dk> wrote:
> Greg Ward skrev:
>> Never mind.  I give up on making this test work.  CVS is too damn
>> unreliable -- it just behaves differently from run to run no matter
>> how many sleeps I put in. ;-(
>>
>> (OK, OK, I maxed out at "sleep 1" before and after every "cvs ci".
>> Seems excessive but it still didn't work.)
>
> What version of CVS are you using? I can't reproduce errors on either
> CVSNT or CVS 1.12.13.

Various.  I've got failures on several platforms.  Here are the
results from running it 10 times on each platform.

1) mainstream desktop PC (1.6 GHz Core 2 Duo, 2 GB RAM, Ubuntu 9.04,
CVS 1.12.13):
  - passed 7 times, failed 3 times

2) old, slow PowerMac (NetBSD 4.0, CVS 1.11.22)
  - passed 0 times, failed 10 times

3) middle-aged laptop PC (1.4 GHz Pentium M, 768 GB RAM, Ubuntu 8.10,
CVS 1.12.13)
  - passed 9 times, failed 1 time

4) beefy Intel server (4 2.33 GHz Xeons, 8 GB RAM, Ubuntu 8.04, CVS 1.11.22)
  - passed 0 times, failed 10 times

Conclusion: the test is completely broken on CVS 1.11 for
trivial-looking reasons (see below).  With CVS 1.12, it's inconsistent
because CVS behaves inconsistently.

The failures on CVS 1.11 are all the same:

--- Expected output
+++ Test output
@@ -3,45 +3,57 @@
 U cvsworktmp/CVSROOT/commitinfo
 U cvsworktmp/CVSROOT/config
 U cvsworktmp/CVSROOT/cvswrappers
+U cvsworktmp/CVSROOT/editinfo
 U cvsworktmp/CVSROOT/loginfo
 U cvsworktmp/CVSROOT/modules
 U cvsworktmp/CVSROOT/notify
-U cvsworktmp/CVSROOT/postadmin
-U cvsworktmp/CVSROOT/postproxy
-U cvsworktmp/CVSROOT/posttag
-U cvsworktmp/CVSROOT/postwatch
-U cvsworktmp/CVSROOT/preproxy
 U cvsworktmp/CVSROOT/rcsinfo
 U cvsworktmp/CVSROOT/taginfo
 U cvsworktmp/CVSROOT/verifymsg

-cvs add: use `cvs commit' to add this file permanently
+cvs add: use 'cvs commit' to add this file permanently
+checking in
+done
+Checking in foo.txt;
 checking in
 initial revision: 1.1
+done
 U cvswork/foo.txt
+Checking in foo.txt;
 checking in
 new revision: 1.1.4.1; previous revision: 1.1
+done
 rcsmerge: warning: conflicts during merge
 merging MYBRANCH1
 retrieving revision 1.1
 retrieving revision 1.1.2.2
 Merging differences between 1.1 and 1.1.2.2 into foo.txt
+Checking in foo.txt;
 checking in
 new revision: 1.1.4.2; previous revision: 1.1.4.1
+done
 U foo.txt
 merging MYBRANCH1_2
 retrieving revision 1.1
 retrieving revision 1.1.2.2.2.1
 Merging differences between 1.1 and 1.1.2.2.2.1 into foo.txt
+Checking in foo.txt;
 checking in
 new revision: 1.2; previous revision: 1.1
+done
 collecting CVS rlog
 7 log entries
 creating changesets

Obviously these are just spurious differences in output between CVS
1.11 and 1.12.  I'll send a patch to handle these shortly; I've done
similar hacks in other test-convert-cvs* scripts (sigh).

With CVS 1.12, there are a couple of failure modes.  I'm showing only
the start of the failure here.

Failure mode 1 (observed twice):
"""
--- Expected output
+++ Test output
@@ -22,24 +22,22 @@
 checking in
 new revision: 1.1.2.1; previous revision: 1.1
 checking in
-new revision: 1.1.2.2; previous revision: 1.1.2.1
-checking in
-new revision: 1.1.2.2.2.1; previous revision: 1.1.2.2
+new revision: 1.1.2.1.2.1; previous revision: 1.1.2.1
 U foo.txt
 checking in
 new revision: 1.1.4.1; previous revision: 1.1
 rcsmerge: warning: conflicts during merge
[...]
"""

Failure mode 2 (observed twice):
"""
--- Expected output
+++ Test output
@@ -26,15 +26,13 @@
 checking in
 new revision: 1.1.2.2.2.1; previous revision: 1.1.2.2
 U foo.txt
-checking in
-new revision: 1.1.4.1; previous revision: 1.1
 rcsmerge: warning: conflicts during merge
 merging MYBRANCH1
[...]
"""

It appears to me that these all boil down to CVS deciding to ignore a
"commit" command, presumably because of file timestamps.  I assume
that's what the "sleep before commit" or "sleep after commit" hack is
supposed to fix ... but it didn't work in this case.

Hmmm: what about using 'touch' instead of sleeping?

Greg

P.S. i hate cvs i hate cvs i hate cvs i hate cvs i hate cvs i hate ...



More information about the Mercurial-devel mailing list