test-largefiles: partially adapt for Windows
authorAdrian Buehlmann <adrian@cadifra.com>
Sat, 30 Jun 2012 19:31:03 +0200
changeset 17088 31f7dd50ed40
parent 17087 a79776f427b4
child 17089 0c1d10351869
test-largefiles: partially adapt for Windows The adaption is partial, because "serve" is not yet officially supported in tests on Windows. The test passes on Windows with an experimental testbed that supports hg serve in tests on Windows - except for some USERCACHE issues. The added (glob)'s are needed because of backslash <-> shlash issues in paths.
tests/test-largefiles.t
--- a/tests/test-largefiles.t	Mon Jul 02 01:47:59 2012 +0200
+++ b/tests/test-largefiles.t	Sat Jun 30 19:31:03 2012 +0200
@@ -1,5 +1,5 @@
   $ "$TESTDIR/hghave" serve || exit 80
-  $ USERCACHE=`pwd`/cache; export USERCACHE
+  $ USERCACHE="$TESTTMP/cache"; export USERCACHE
   $ mkdir -p ${USERCACHE}
   $ cat >> $HGRCPATH <<EOF
   > [extensions]
@@ -14,7 +14,7 @@
   > patterns=glob:**.dat
   > usercache=${USERCACHE}
   > [hooks]
-  > precommit=echo "Invoking status precommit hook"; hg status
+  > precommit=sh -c "echo \"Invoking status precommit hook\"; hg status"
   > EOF
 
 Create the repo with a couple of revisions of both large and normal
@@ -463,7 +463,7 @@
   $ rm -Rf ${USERCACHE}/*
   $ cd a-backup
   $ hg pull --all-largefiles
-  pulling from $TESTTMP/a
+  pulling from $TESTTMP/a (glob)
   searching for changes
   adding changesets
   adding manifests
@@ -989,7 +989,7 @@
   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/
+  abort: remotestore: could not put $TESTTMP/r7/.hg/largefiles/4cdac4d8b084d0b599525cf732437fb337d422a8 to remote store http://localhost:$HGPORT1/ (glob)
   [255]
   $ rm -rf empty