git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-cvsexportcommit can't commit files which have been removed from CVS

From
NWNick Woolley <nickwoolley@yahoo.co.uk>
Date
Jun 11, 2009, 14:10 UTC
Message-ID
<4A311053.5060802@yahoo.co.uk>
In-Reply-To
<e2b179460906100106x2b9c0bb4r931b0a12959d4314@mail.gmail.com>
Mike Ralphson wrote:
Show 9 quoted lines
> Hi Nick, I'm seeing intermittent failures since your new test was
> added to 'next' on AIX 5.3
> 
> cvs commit: Up-to-date check failed for ` space'
> cvs [commit aborted]: correct above errors first!
> * FAIL 15: re-commit a removed filename which remains in CVS attic
> * failed 1 among 15 test(s)
> 
> Is there a possibility this test has a race condition?
Hm, I have thought not, but what sort of a race condition did you have in mind?
> Let me know if there's anything I can do to help debug it.
> 
> It could be a bug in the ancient CVS I have here (1.11.1p1) though.
I wouldn't be surprised.

What my fix does is to spot files marked "Up-to-date" but which have "no file " prepended to the filename in cvs status's output, which means the file used to exist but was deleted from the repository, not that it is "Up-to-date" in the sense you'd expect.

If old versions of CVS report these files differently they may not be spotted.

I don't know why the " space" file seems to be causing a problem - it shouldn't interfere with the test I added (and indeed doesn't for me).

Perhaps you could apply the following patch to t/t9200-git-cvsexportcommit.sh, run it, and send the contents of t/debug.out? What I get is appended after the patch.

You might also try commenting out the following part of my test, so that it should trivially work, and see if there's still an error:

# rm attic_gremlin && # cvs -Q rm attic_gremlin && # cvs -Q ci -m "removed attic_gremlin"

Cheers,
N
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index ef1f8d2..4f19a47 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -320,12 +320,19 @@ test_expect_success 'use the same checkout for Git and CVS' '
 test_expect_success 're-commit a removed filename which remains in CVS attic' '

     (cd "$CVSWORK" &&
+     dlog=../../debug.out &&
+     echo "# before adding file"  >$dlog &&
+     cvs status attic_gremlin " space" >>$dlog 2>&1 &&
+
      echo >attic_gremlin &&
      cvs -Q add attic_gremlin &&
      cvs -Q ci -m "added attic_gremlin" &&
      rm attic_gremlin &&
      cvs -Q rm attic_gremlin &&
-     cvs -Q ci -m "removed attic_gremlin") &&
+     cvs -Q ci -m "removed attic_gremlin" &&
+
+     echo "# after adding file"  >>$dlog &&
+     cvs status attic_gremlin " space" >>$dlog 2>&1) &&

     echo > attic_gremlin &&
     git add attic_gremlin &&

----
# before adding file
cvs status: nothing known about `attic_gremlin'
===================================================================
File: no file attic_gremlin		Status: Unknown

   Working revision:	No entry for attic_gremlin
   Repository revision:	No revision control file

===================================================================
File:  space           	Status: Up-to-date

   Working revision:	1.1	2009-06-11 13:56:15 +0000
   Repository revision:	1.1	/home/nick/gitworking/git/t/trash
directory.t9200-git-cvsexportcommit/cvsroot/ space,v
   Commit Identifier:	oDOEzyj3FzAazrRt
   Sticky Tag:		(none)
   Sticky Date:		(none)
   Sticky Options:	(none)

# after adding file
===================================================================
File: no file attic_gremlin		Status: Up-to-date

   Working revision:	No entry for attic_gremlin
   Repository revision:	1.2	/home/nick/gitworking/git/t/trash
directory.t9200-git-cvsexportcommit/cvsroot/Attic/attic_gremlin,v
   Commit Identifier:	X1mPOnzvk5rczrRt

===================================================================
File:  space           	Status: Up-to-date

   Working revision:	1.1	2009-06-11 13:56:15 +0000
   Repository revision:	1.1	/home/nick/gitworking/git/t/trash
directory.t9200-git-cvsexportcommit/cvsroot/ space,v
   Commit Identifier:	oDOEzyj3FzAazrRt
   Sticky Tag:		(none)
   Sticky Date:		(none)
   Sticky Options:	(none)
Previous: Mike RalphsonNext: Junio C Hamano
Message 3 of 9 in “git-cvsexportcommit can't commit files which have been removed from CVS”
  1. git-cvsexportcommit can't commit files which have been removed from CVSNick Woolley, May 28, 2009
  2. Mike RalphsonJun 10, 2009
  3. Nick WoolleyJun 11, 2009
  4. Junio C HamanoJun 11, 2009
  5. Junio C HamanoJun 11, 2009
  6. Junio C HamanoJun 11, 2009
  7. Robin RosenbergJun 12, 2009
  8. Mike RalphsonJul 2, 2009
  9. Nick WoolleyJul 6, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.