{"thread":{"id":"19565","subject":"[PATCH] git-cvsexportcommit can't commit files which have been removed from CVS","startedAt":"2009-05-28T23:23:33Z","lastAt":"2009-07-06T13:23:31Z","messageCount":9,"participants":["Nick Woolley","Mike Ralphson","Junio C Hamano","Robin Rosenberg"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"114974","messageId":"4A1F1CF5.8030002@yahoo.co.uk","threadId":"19565","inReplyTo":null,"subject":"[PATCH] git-cvsexportcommit can't commit files which have been removed from CVS","fromName":"Nick Woolley","fromEmail":"nickwoolley@yahoo.co.uk","sentAt":"2009-05-28T23:23:33Z","receivedAt":"2009-05-28T23:23:33Z","isPatch":true,"sender":{"key":"nick@noodlefactory.co.uk","avatar":null},"body":"If a file X is removed from CVS, it goes into the Attic directory, and\nCVS reports it as 'no file X' but with status 'Up-to-date'.  This is\nmisinterpreted an existing file when git-cvsexportcommit tries to commit a file\nwith the same name as one of these.  This patch attempts to correctly identify\nthese files, so that new files with the same name can be committed.\n\nAdded a test to t9200-git-cvsexportcommit.sh, which tests that we can\nre-commit a removed filename which remains in CVS's attic. This adds a\nfile 'attic_gremlin' in CVS, then \"removes\" it, then tries to commit a\nfile with the same name from git.\n\nSigned-off-by: Nick Woolley <git.wu-lee@noodlefactory.co.uk>\n---\n git-cvsexportcommit.perl       |   49 ++++++++++++++++++++++++++++-----------\n t/t9200-git-cvsexportcommit.sh |   18 ++++++++++++++\n 2 files changed, 53 insertions(+), 14 deletions(-)\n\ndiff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl\nindex 6d9f0ef..e5e8ca9 100755\n--- a/git-cvsexportcommit.perl\n+++ b/git-cvsexportcommit.perl\n@@ -225,7 +225,14 @@ if (@canstatusfiles) {\n       foreach my $name (keys %todo) {\n \tmy $basename = basename($name);\n\n-\t$basename = \"no file \" . $basename if (exists($added{$basename}));\n+\t# CVS reports files which are \"status\"ed which don't exist\n+\t# in the current revision as \"no file $basename\", so we\n+\t# should anticipate that.  Totally unknown files will have\n+\t# a status \"Unknown\". However, if they exist in the attic\n+\t# their status will be \"Up-to-date\" (this means they were\n+\t# added once but have been removed).\n+\t$basename = \"no file $basename\" if $added{$basename};\n+\n \t$basename =~ s/^\\s+//;\n \t$basename =~ s/\\s+$//;\n\n@@ -233,31 +240,45 @@ if (@canstatusfiles) {\n \t  $fullname{$basename} = $name;\n \t  push (@canstatusfiles2, $name);\n \t  delete($todo{$name});\n-        }\n+\t}\n       }\n       my @cvsoutput;\n       @cvsoutput = xargs_safe_pipe_capture([@cvs, 'status'], @canstatusfiles2);\n       foreach my $l (@cvsoutput) {\n-        chomp $l;\n-        if ($l =~ /^File:\\s+(.*\\S)\\s+Status: (.*)$/) {\n-\t  if (!exists($fullname{$1})) {\n-\t    print STDERR \"Huh? Status reported for unexpected file '$1'\\n\";\n-\t  } else {\n-\t    $cvsstat{$fullname{$1}} = $2;\n-\t  }\n-\t}\n+\tchomp $l;\n+\tnext unless\n+\t    my ($file, $status) = $l =~ /^File:\\s+(.*\\S)\\s+Status: (.*)$/;\n+\n+\tmy $fullname = $fullname{$file};\n+\tprint STDERR \"Huh? Status '$status' reported for unexpected file '$file'\\n\"\n+\t    unless defined $fullname;\n+\n+\t# This response means the file does not exist except in\n+\t# CVS's attic, so set the status accordingly\n+\t$status = \"In-attic\"\n+\t    if $file =~ /^no file /\n+\t\t&& $status eq 'Up-to-date';\n+\n+\t$cvsstat{$fullname{$file}} = $status;\n       }\n     }\n }\n\n-# ... validate new files,\n+# ... Validate new files have the correct status\n foreach my $f (@afiles) {\n-    if (defined ($cvsstat{$f}) and $cvsstat{$f} ne \"Unknown\") {\n-\t$dirty = 1;\n+    next unless defined(my $stat = $cvsstat{$f});\n+\n+    # This means the file has never been seen before\n+    next if $stat eq 'Unknown';\n+\n+    # This means the file has been seen before but was removed\n+    next if $stat eq 'In-attic';\n+\n+    $dirty = 1;\n \twarn \"File $f is already known in your CVS checkout -- perhaps it has been\nadded by another user. Or this may indicate that it exists on a different\nbranch. If this is the case, use -f to force the merge.\\n\";\n \twarn \"Status was: $cvsstat{$f}\\n\";\n-    }\n }\n+\n # ... validate known files.\n foreach my $f (@files) {\n     next if grep { $_ eq $f } @afiles;\ndiff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh\nindex 56b7c06..ef1f8d2 100755\n--- a/t/t9200-git-cvsexportcommit.sh\n+++ b/t/t9200-git-cvsexportcommit.sh\n@@ -317,4 +317,22 @@ test_expect_success 'use the same checkout for Git and CVS' '\n\n '\n\n+test_expect_success 're-commit a removed filename which remains in CVS attic' '\n+\n+    (cd \"$CVSWORK\" &&\n+     echo >attic_gremlin &&\n+     cvs -Q add attic_gremlin &&\n+     cvs -Q ci -m \"added attic_gremlin\" &&\n+     rm attic_gremlin &&\n+     cvs -Q rm attic_gremlin &&\n+     cvs -Q ci -m \"removed attic_gremlin\") &&\n+\n+    echo > attic_gremlin &&\n+    git add attic_gremlin &&\n+    git commit -m \"Added attic_gremlin\" &&\n+\tgit cvsexportcommit -w \"$CVSWORK\" -c HEAD &&\n+    (cd \"$CVSWORK\"; cvs -Q update -d) &&\n+    test -f \"$CVSWORK/attic_gremlin\"\n+'\n+\n test_done\n"},{"id":"115995","messageId":"e2b179460906100106x2b9c0bb4r931b0a12959d4314@mail.gmail.com","threadId":"19565","inReplyTo":"4A1F1CF5.8030002@yahoo.co.uk","subject":"Re: [PATCH] git-cvsexportcommit can't commit files which have been removed from CVS","fromName":"Mike Ralphson","fromEmail":"mike.ralphson@gmail.com","sentAt":"2009-06-10T08:06:01Z","receivedAt":"2009-06-10T08:06:01Z","isPatch":true,"sender":{"key":"mike.ralphson@gmail.com","avatar":"https://avatars.githubusercontent.com/u/21603?v=4"},"body":"2009/5/29 Nick Woolley <nickwoolley@yahoo.co.uk>\n> Added a test to t9200-git-cvsexportcommit.sh, which tests that we can\n> re-commit a removed filename which remains in CVS's attic. This adds a\n> file 'attic_gremlin' in CVS, then \"removes\" it, then tries to commit a\n> file with the same name from git.\n\nHi Nick, I'm seeing intermittent failures since your new test was\nadded to 'next' on AIX 5.3\n\ncvs commit: Up-to-date check failed for ` space'\ncvs [commit aborted]: correct above errors first!\n* FAIL 15: re-commit a removed filename which remains in CVS attic\n* failed 1 among 15 test(s)\n\nIs there a possibility this test has a race condition?\n\nLet me know if there's anything I can do to help debug it.\n\nIt could be a bug in the ancient CVS I have here (1.11.1p1) though.\n\ncvs status: Examining .\n===================================================================\nFile:  space            Status: Needs Patch\n\nAs it's a file from the previous tests being fingered, I've cc'd a\ncouple of likely lads.\n\nMike\n"},{"id":"116071","messageId":"4A311053.5060802@yahoo.co.uk","threadId":"19565","inReplyTo":"e2b179460906100106x2b9c0bb4r931b0a12959d4314@mail.gmail.com","subject":"Re: [PATCH] git-cvsexportcommit can't commit files which have been removed from CVS","fromName":"Nick Woolley","fromEmail":"nickwoolley@yahoo.co.uk","sentAt":"2009-06-11T14:10:27Z","receivedAt":"2009-06-11T14:10:27Z","isPatch":true,"sender":{"key":"nick@noodlefactory.co.uk","avatar":null},"body":"Mike Ralphson wrote:\n> Hi Nick, I'm seeing intermittent failures since your new test was\n> added to 'next' on AIX 5.3\n> \n> cvs commit: Up-to-date check failed for ` space'\n> cvs [commit aborted]: correct above errors first!\n> * FAIL 15: re-commit a removed filename which remains in CVS attic\n> * failed 1 among 15 test(s)\n> \n> Is there a possibility this test has a race condition?\n\nHm, I have thought not, but what sort of a race condition did you have in mind?\n\n> Let me know if there's anything I can do to help debug it.\n> \n> It could be a bug in the ancient CVS I have here (1.11.1p1) though.\n\nI wouldn't be surprised.\n\nWhat my fix does is to spot files marked \"Up-to-date\" but which have \"no file \"\nprepended to the filename in cvs status's output, which means the file used to\nexist but was deleted from the repository, not that it is \"Up-to-date\" in the\nsense you'd expect.\n\nIf old versions of CVS report these files differently they may not be spotted.\n\nI don't know why the  \" space\" file seems to be causing a problem - it shouldn't\ninterfere with the test I added (and indeed doesn't for me).\n\nPerhaps you could apply the following patch to t/t9200-git-cvsexportcommit.sh,\nrun it, and send the contents of t/debug.out?  What I get is appended after the\npatch.\n\nYou might also try commenting out the following part of my test, so that it\nshould trivially work, and see if there's still an error:\n\n#      rm attic_gremlin &&\n#      cvs -Q rm attic_gremlin &&\n#      cvs -Q ci -m \"removed attic_gremlin\"\n\nCheers,\n\nN\n\n\ndiff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh\nindex ef1f8d2..4f19a47 100755\n--- a/t/t9200-git-cvsexportcommit.sh\n+++ b/t/t9200-git-cvsexportcommit.sh\n@@ -320,12 +320,19 @@ test_expect_success 'use the same checkout for Git and CVS' '\n test_expect_success 're-commit a removed filename which remains in CVS attic' '\n\n     (cd \"$CVSWORK\" &&\n+     dlog=../../debug.out &&\n+     echo \"# before adding file\"  >$dlog &&\n+     cvs status attic_gremlin \" space\" >>$dlog 2>&1 &&\n+\n      echo >attic_gremlin &&\n      cvs -Q add attic_gremlin &&\n      cvs -Q ci -m \"added attic_gremlin\" &&\n      rm attic_gremlin &&\n      cvs -Q rm attic_gremlin &&\n-     cvs -Q ci -m \"removed attic_gremlin\") &&\n+     cvs -Q ci -m \"removed attic_gremlin\" &&\n+\n+     echo \"# after adding file\"  >>$dlog &&\n+     cvs status attic_gremlin \" space\" >>$dlog 2>&1) &&\n\n     echo > attic_gremlin &&\n     git add attic_gremlin &&\n\n----\n# before adding file\ncvs status: nothing known about `attic_gremlin'\n===================================================================\nFile: no file attic_gremlin\t\tStatus: Unknown\n\n   Working revision:\tNo entry for attic_gremlin\n   Repository revision:\tNo revision control file\n\n===================================================================\nFile:  space           \tStatus: Up-to-date\n\n   Working revision:\t1.1\t2009-06-11 13:56:15 +0000\n   Repository revision:\t1.1\t/home/nick/gitworking/git/t/trash\ndirectory.t9200-git-cvsexportcommit/cvsroot/ space,v\n   Commit Identifier:\toDOEzyj3FzAazrRt\n   Sticky Tag:\t\t(none)\n   Sticky Date:\t\t(none)\n   Sticky Options:\t(none)\n\n# after adding file\n===================================================================\nFile: no file attic_gremlin\t\tStatus: Up-to-date\n\n   Working revision:\tNo entry for attic_gremlin\n   Repository revision:\t1.2\t/home/nick/gitworking/git/t/trash\ndirectory.t9200-git-cvsexportcommit/cvsroot/Attic/attic_gremlin,v\n   Commit Identifier:\tX1mPOnzvk5rczrRt\n\n===================================================================\nFile:  space           \tStatus: Up-to-date\n\n   Working revision:\t1.1\t2009-06-11 13:56:15 +0000\n   Repository revision:\t1.1\t/home/nick/gitworking/git/t/trash\ndirectory.t9200-git-cvsexportcommit/cvsroot/ space,v\n   Commit Identifier:\toDOEzyj3FzAazrRt\n   Sticky Tag:\t\t(none)\n   Sticky Date:\t\t(none)\n   Sticky Options:\t(none)\n"},{"id":"298985","messageId":"7vy6ryixjd.fsf@alter.siamese.dyndns.org","threadId":"19565","inReplyTo":"4A311053.5060802@yahoo.co.uk","subject":"Re: [PATCH] git-cvsexportcommit can't commit files which have been removed from CVS","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-11T15:45:58Z","receivedAt":"2009-06-11T15:45:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":""},{"id":"116076","messageId":"7vr5xqixd1.fsf@alter.siamese.dyndns.org","threadId":"19565","inReplyTo":"4A311053.5060802@yahoo.co.uk","subject":"Re: [PATCH] git-cvsexportcommit can't commit files which have been removed from CVS","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-11T15:49:46Z","receivedAt":"2009-06-11T15:49:46Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nick Woolley <nickwoolley@yahoo.co.uk> writes:\n\n> Mike Ralphson wrote:\n>> Hi Nick, I'm seeing intermittent failures since your new test was\n>> added to 'next' on AIX 5.3\n>> \n>> cvs commit: Up-to-date check failed for ` space'\n>> cvs [commit aborted]: correct above errors first!\n>> * FAIL 15: re-commit a removed filename which remains in CVS attic\n>> * failed 1 among 15 test(s)\n>> \n>> Is there a possibility this test has a race condition?\n>\n> Hm, I have thought not, but what sort of a race condition did you have in mind?\n>\n>> Let me know if there's anything I can do to help debug it.\n>> \n>> It could be a bug in the ancient CVS I have here (1.11.1p1) though.\n>\n> I wouldn't be surprised.\n\nI just saw this on a k.org machine that runs Fedora 9 (Sulphur); 1.11.22\nis the version of CVS that comes with it.\n\nBut it does seem to be repeatable; I wouldn't rule out a race condition.\n"},{"id":"116083","messageId":"7vzlcehfbd.fsf@alter.siamese.dyndns.org","threadId":"19565","inReplyTo":"7vr5xqixd1.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] git-cvsexportcommit can't commit files which have been removed from CVS","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2009-06-11T17:04:54Z","receivedAt":"2009-06-11T17:04:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Nick Woolley <nickwoolley@yahoo.co.uk> writes:\n>> Mike Ralphson wrote:\n>>> cvs commit: Up-to-date check failed for ` space'\n>>> cvs [commit aborted]: correct above errors first!\n>>> * FAIL 15: re-commit a removed filename which remains in CVS attic\n>>> * failed 1 among 15 test(s)\n> But it does seem to be repeatable; I wouldn't rule out a race condition.\n\nEhh, sorry, it \"does not\" seem to be repeatable.  Sometimes and only\nsometimes it fails...\n"},{"id":"116126","messageId":"200906120859.33139.robin.rosenberg.lists@dewire.com","threadId":"19565","inReplyTo":"7vzlcehfbd.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] git-cvsexportcommit can't commit files which have been removed from CVS","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2009-06-12T06:59:32Z","receivedAt":"2009-06-12T06:59:32Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"torsdag 11 juni 2009 19:04:54 skrev Junio C Hamano <gitster@pobox.com>:\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n> > Nick Woolley <nickwoolley@yahoo.co.uk> writes:\n> >> Mike Ralphson wrote:\n> >>> cvs commit: Up-to-date check failed for ` space'\n> >>> cvs [commit aborted]: correct above errors first!\n> >>> * FAIL 15: re-commit a removed filename which remains in CVS attic\n> >>> * failed 1 among 15 test(s)\n> > But it does seem to be repeatable; I wouldn't rule out a race condition.\n> \n> Ehh, sorry, it \"does not\" seem to be repeatable.  Sometimes and only\n> sometimes it fails...\n\nCVS har a timestamp in CVS/Entries that has whole second resolution. In\naddition it's built-in method for trying to work around the problem by sleeping\nuntil the next second wraps around is flaky.  cvsexportcommit already has\none sleep for this. Maybe it's not enough.\n\n-- robin\n"},{"id":"117364","messageId":"e2b179460907020650u672d8724p45f67173668332aa@mail.gmail.com","threadId":"19565","inReplyTo":"4A311053.5060802@yahoo.co.uk","subject":"Re: [PATCH] git-cvsexportcommit can't commit files which have been removed from CVS","fromName":"Mike Ralphson","fromEmail":"mike.ralphson@gmail.com","sentAt":"2009-07-02T13:50:38Z","receivedAt":"2009-07-02T13:50:38Z","isPatch":true,"sender":{"key":"mike.ralphson@gmail.com","avatar":"https://avatars.githubusercontent.com/u/21603?v=4"},"body":"2009/6/11 Nick Woolley <nickwoolley@yahoo.co.uk>\n>\n> Mike Ralphson wrote:\n> > Hi Nick, I'm seeing intermittent failures since your new test was\n> > added to 'next' on AIX 5.3\n> >\n> > cvs commit: Up-to-date check failed for ` space'\n> > cvs [commit aborted]: correct above errors first!\n> > * FAIL 15: re-commit a removed filename which remains in CVS attic\n> > * failed 1 among 15 test(s)\n> >\n> > Let me know if there's anything I can do to help debug it.\n> >\n>\n> I don't know why the  \" space\" file seems to be causing a problem - it shouldn't\n> interfere with the test I added (and indeed doesn't for me).\n>\n> Perhaps you could apply the following patch to t/t9200-git-cvsexportcommit.sh,\n> run it, and send the contents of t/debug.out?  What I get is appended after the\n> patch.\n\nOn a failed run, the error is on the commit adding attic_gremlin:\n\n    echo > attic_gremlin &&\n    git add attic_gremlin &&\n    git commit -m \"Added attic_gremlin\" &&\n        git cvsexportcommit -w \"$CVSWORK\" -c HEAD &&\n    (cd \"$CVSWORK\"; cvs -Q update -d) &&\n    test -f \"$CVSWORK/attic_gremlin\"\n\ncvs commit: Up-to-date check failed for ` space'\ncvs [commit aborted]: correct above errors first!\n* FAIL 15: re-commit a removed filename which remains in CVS attic\n\ndebug.out contains the following:\n\n# before adding file\ncvs status: nothing known about attic_gremlin\n===================================================================\nFile: no file attic_gremlin             Status: Unknown\n\n   Working revision:    No entry for attic_gremlin\n   Repository revision: No revision control file\n\n===================================================================\nFile:  space            Status: Needs Patch\n\n   Working revision:    1.1     Thu Jul  2 12:50:17 2009\n   Repository revision: 1.2     /usr/local/src/gitbuild/t/trash\ndirectory.t9200-git-cvsexportcommit/cvsroot/ space,v\n   Sticky Tag:          (none)\n   Sticky Date:         (none)\n   Sticky Options:      (none)\n\n===\n\nthe \" space\" file in cvswork is:\n\n-rw-rw----    1 mike     staff           6 2009-07-02\n13:50:17.000000000 +0100  space\n\nCVS/Entries for the file has\n/ space/1.1/Thu Jul  2 12:50:17 2009//\n\n> You might also try commenting out the following part of my test, so that it\n> should trivially work, and see if there's still an error:\n>\n> #      rm attic_gremlin &&\n> #      cvs -Q rm attic_gremlin &&\n> #      cvs -Q ci -m \"removed attic_gremlin\"\n\nIt all goes a bit fun if I do that...\n\nRCS file: /usr/local/src/gitbuild/t/trash\ndirectory.t9200-git-cvsexportcommit/cvsroot/attic_gremlin,v\ndone\nChecking in attic_gremlin;\n/usr/local/src/gitbuild/t/trash\ndirectory.t9200-git-cvsexportcommit/cvsroot/attic_gremlin,v  <--\nattic_gremlin\ninitial revision: 1.1\ndone\n[master 20999b1] Added attic_gremlin\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 attic_gremlin\n\\1 better written as $1 at\n/usr/local/src/gitbuild/t/../git-cvsexportcommit line 303.\nChecking if patch will apply\nHuh? Status 'Up-to-date' reported for unexpected file 'attic_gremlin'\nUse of uninitialized value in hash element at\n/usr/local/src/gitbuild/t/../git-cvsexportcommit line 263.\nUse of uninitialized value in hash element at\n/usr/local/src/gitbuild/t/../git-cvsexportcommit line 263.\nApplying\nerror: attic_gremlin: already exists in working directory\ncannot patch at /usr/local/src/gitbuild/t/../git-cvsexportcommit line 323.\n* FAIL 15: re-commit a removed filename which remains in CVS attic\n\n2009/6/12 Robin Rosenberg <robin.rosenberg.lists@dewire.com>:\n> CVS har a timestamp in CVS/Entries that has whole second resolution. In\n> addition it's built-in method for trying to work around the problem by sleeping\n> until the next second wraps around is flaky.  cvsexportcommit already has\n> one sleep for this. Maybe it's not enough.\n\nFrom the comment in cvsexportcommit:\n# CVS version 1.11.x and 1.12.x sleeps the wrong way to ensure the timestamp\n# used by CVS and the one set by subsequence file modifications are different.\n# If they are not different CVS will not detect changes.\nsleep(1);\n\nI tried changing this to 2 seconds, but I still got a failure on the\n7th run. Life's too short to try changing it to 3 seconds in case I'm\nbeing bitten by this from the perldoc:\n\n\"On some older systems, it may sleep up to a full second less than\nwhat you requested, depending on how it counts seconds. Most modern\nsystems always sleep the full amount.\"\n\nAnd that's not taking into account sleeps being interrupted due to signals.\n\nWould it be acceptable to simply reorder the tests so this previously\nunreported error goes away again?\n\nMike\n"},{"id":"117504","messageId":"4A51FAD3.7010306@yahoo.co.uk","threadId":"19565","inReplyTo":"e2b179460907020650u672d8724p45f67173668332aa@mail.gmail.com","subject":"Re: [PATCH] git-cvsexportcommit can't commit files which have been removed from CVS","fromName":"Nick Woolley","fromEmail":"nickwoolley@yahoo.co.uk","sentAt":"2009-07-06T13:23:31Z","receivedAt":"2009-07-06T13:23:31Z","isPatch":true,"sender":{"key":"nick@noodlefactory.co.uk","avatar":null},"body":"Mike Ralphson wrote:\n> debug.out contains the following:\n> \n> # before adding file\n> cvs status: nothing known about attic_gremlin\n> ===================================================================\n> File: no file attic_gremlin             Status: Unknown\n> \n>    Working revision:    No entry for attic_gremlin\n>    Repository revision: No revision control file\n> \n> ===================================================================\n> File:  space            Status: Needs Patch\n\nThis is what I get on this line:\n\n  File:  space           \tStatus: Up-to-date\n\nWhich might explain why it fails the 'up to date check' in your case - it seems\nthat CVS hasn't synchronised the \" space\" file with the respository?  Or is this\nan artifact created by the race condition Robin mentioned?  I gather the problem\nappears intermittently.\n\n\n> \n> CVS/Entries for the file has\n> / space/1.1/Thu Jul  2 12:50:17 2009//\n> \n>> You might also try commenting out the following part of my test, so that it\n>> should trivially work, and see if there's still an error:\n>>\n>> #      rm attic_gremlin &&\n>> #      cvs -Q rm attic_gremlin &&\n>> #      cvs -Q ci -m \"removed attic_gremlin\"\n> \n> It all goes a bit fun if I do that...\n> \n\nActually, I get the error you do here - my mistake, I should have told you to\ncomment out the whole clause, i.e.:\n\n#     (cd \"$CVSWORK\" &&\n#      echo >attic_gremlin &&\n#      cvs -Q add attic_gremlin &&\n#      cvs -Q ci -m \"added attic_gremlin\" &&\n#      rm attic_gremlin &&\n#      cvs -Q rm attic_gremlin &&\n#      cvs -Q ci -m \"removed attic_gremlin\") &&\n\nI've checked this passes for me.\n\n\n> Would it be acceptable to simply reorder the tests so this previously\n> unreported error goes away again?\n\nSpeaking personally, I can't see why not, although I don't understand the\nmechanism of the race condition in question. Wouldn't a race condition like this\npotentially cause similar errors to crop up all through the test script,\nwhenever git-cvsexportingcommit gets a bogus \"Needs Patch\" status?\n\nAn alternative might be to start my particular test by creating a new CVS\nrepository.\n\n\nCheers,\n\nN\n\nps I've patched git-cvsexportcommit.perl to get rid of the warnings I can also\nsee in your output, and will submit those to this list separately.\n"}]}