# HG changeset patch # User Adrian Buehlmann # Date 2012-07-22 11:16:45 # Node ID 0cfece81e051c253d9cf8b7cfacaaf54bafe99ce # Parent acea82757d8a0520e2d71a6a352a5b9c59c451f2 test-largefiles: fix test failing on vfat file systems The usercache hardlinks files for filesystems that support hardlinks. So when this test is run on a filesystem that supports hardlinking, we have a link in r7 and in the usercache, pointing to the same file contents (4cdac4d8...). vfat does not support hardlinks, the file in the cache and in the store of r7 are thus independent. For the test to pass on vfat, we need to corrupt *both* the largefile in the usercache and in the store of r7. Corrupting only one of them is not sufficient. Fixes: --- /home/buildslave/mercurial/vfat_hg_tests__stable_/build/tests/test-largefiles.t +++ /home/buildslave/mercurial/vfat_hg_tests__stable_/build/tests/test-largefiles.t.err @@ -997,9 +997,11 @@ $ hg push -R r7 http://localhost:$HGPORT1 pushing to http://localhost:$HGPORT1/ searching for changes - remote: largefiles: failed to put 4cdac4d8b084d0b599525cf732437fb337d422a8 into store: largefile contents do not match hash - abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob) - [255] + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 2 changesets with 2 changes to 2 files $ rm -rf empty Push a largefiles repository to a served empty repository diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -1128,7 +1128,8 @@ largefiles clients refuse to push largef $ cd .. putlfile errors are shown (issue3123) -Corrupt the cached largefile in r7 +Corrupt the cached largefile in r7 and in the usercache (required for testing on vfat) + $ echo corruption > "$TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8" $ echo corruption > "$USERCACHE/4cdac4d8b084d0b599525cf732437fb337d422a8" $ hg init empty $ hg serve -R empty -d -p $HGPORT1 --pid-file hg.pid \