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

[PATCH] t9400: Work around CVS' deficiencies

From
Frank Lichtenheld <frank@lichtenheld.de>
Date
May 27, 2007, 12:33 UTC
Message-ID
<11802692201027-git-send-email-frank@lichtenheld.de>
In-Reply-To
<1180269190126-git-send-email-frank@lichtenheld.de>

If we are too fast with our changes, the file in the working copy might still have the same mtime as noted in the CVS/Entries. This will cause CVS to happily report to the server that the file is unmodified which can lead to data loss (and in our case test failure).

CVS sucks!
Work around that by sleeping for a second.
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de>
---
 t/t9400-git-cvsserver-server.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index 7f9c6e2..76a9b1a 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -250,6 +250,7 @@ test_expect_success 'cvs update (merge)' \
    git commit -q -m "Merge test (merge)" &&
    git push gitcvs.git >/dev/null &&
    cd cvswork &&
+   sleep 1 && touch merge &&
    GIT_CONFIG="$git_config" cvs -Q update &&
    diff -q merge ../expected'
 
@@ -292,6 +293,7 @@ test_expect_success 'cvs update (merge no-op)' \
     git commit -q -m "Merge test (no-op)" &&
     git push gitcvs.git >/dev/null &&
     cd cvswork &&
+    sleep 1 && touch merge &&
     GIT_CONFIG="$git_config" cvs -Q update &&
     diff -q merge ../merge'
 
-- 
1.5.2-rc3.GIT
Previous: Frank LichtenheldNext: Frank Lichtenheld
Message 5 of 6 in “Various git-cvsserver patches”
  1. Frank LichtenheldMay 27, 2007
  2. cvsserver: Correct inetd.conf example in asciidoc documentationFrank Lichtenheld, May 27, 2007
  3. cvsserver: Note that CVS_SERVER can also be specified as method variableFrank Lichtenheld, May 27, 2007
  4. cvsserver: Fix some typos in asciidoc documentationFrank Lichtenheld, May 27, 2007
  5. t9400: Work around CVS' deficienciesFrank Lichtenheld, May 27, 2007
  6. cvsserver: Handle 'cvs login'Frank Lichtenheld, May 27, 2007

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.