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
Mike Ralphson <mike.ralphson@gmail.com>
Date
Jul 2, 2009, 13:50 UTC
Message-ID
<e2b179460907020650u672d8724p45f67173668332aa@mail.gmail.com>
In-Reply-To
<4A311053.5060802@yahoo.co.uk>
2009/6/11 Nick Woolley <nickwoolley@yahoo.co.uk>
Show 19 quoted lines
>
> Mike Ralphson wrote:
> > 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)
> >
> > Let me know if there's anything I can do to help debug it.
> >
>
> 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.
On a failed run, the error is on the commit adding attic_gremlin:
    echo > attic_gremlin &&
    git add attic_gremlin &&
    git commit -m "Added attic_gremlin" &&
        git cvsexportcommit -w "$CVSWORK" -c HEAD &&
    (cd "$CVSWORK"; cvs -Q update -d) &&
    test -f "$CVSWORK/attic_gremlin"
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
debug.out contains the following:
# 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: Needs Patch
   Working revision:    1.1     Thu Jul  2 12:50:17 2009
   Repository revision: 1.2     /usr/local/src/gitbuild/t/trash
directory.t9200-git-cvsexportcommit/cvsroot/ space,v
   Sticky Tag:          (none)
   Sticky Date:         (none)
   Sticky Options:      (none)
===
the " space" file in cvswork is:

-rw-rw---- 1 mike staff 6 2009-07-02 13:50:17.000000000 +0100 space

CVS/Entries for the file has / space/1.1/Thu Jul 2 12:50:17 2009//

Show 6 quoted lines
> 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"
It all goes a bit fun if I do that...
RCS file: /usr/local/src/gitbuild/t/trash
directory.t9200-git-cvsexportcommit/cvsroot/attic_gremlin,v
done
Checking in attic_gremlin;
/usr/local/src/gitbuild/t/trash
directory.t9200-git-cvsexportcommit/cvsroot/attic_gremlin,v  <--
attic_gremlin
initial revision: 1.1
done
[master 20999b1] Added attic_gremlin
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 attic_gremlin
\1 better written as $1 at
/usr/local/src/gitbuild/t/../git-cvsexportcommit line 303.
Checking if patch will apply
Huh? Status 'Up-to-date' reported for unexpected file 'attic_gremlin'
Use of uninitialized value in hash element at
/usr/local/src/gitbuild/t/../git-cvsexportcommit line 263.
Use of uninitialized value in hash element at
/usr/local/src/gitbuild/t/../git-cvsexportcommit line 263.
Applying
error: attic_gremlin: already exists in working directory
cannot patch at /usr/local/src/gitbuild/t/../git-cvsexportcommit line 323.
* FAIL 15: re-commit a removed filename which remains in CVS attic
2009/6/12 Robin Rosenberg <robin.rosenberg.lists@dewire.com>:
> CVS har a timestamp in CVS/Entries that has whole second resolution. In
> addition it's built-in method for trying to work around the problem by sleeping
> until the next second wraps around is flaky.  cvsexportcommit already has
> one sleep for this. Maybe it's not enough.

From the comment in cvsexportcommit: # CVS version 1.11.x and 1.12.x sleeps the wrong way to ensure the timestamp # used by CVS and the one set by subsequence file modifications are different. # If they are not different CVS will not detect changes. sleep(1);

I tried changing this to 2 seconds, but I still got a failure on the 7th run. Life's too short to try changing it to 3 seconds in case I'm being bitten by this from the perldoc:

"On some older systems, it may sleep up to a full second less than what you requested, depending on how it counts seconds. Most modern systems always sleep the full amount."

And that's not taking into account sleeps being interrupted due to signals.

Would it be acceptable to simply reorder the tests so this previously unreported error goes away again?

Mike
Previous: Robin RosenbergNext: Nick Woolley
Message 8 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.