[PATCH STABLE] test-push-http: fix failing test on Windows

Adrian Buehlmann adrian at cadifra.com
Fri Oct 19 08:07:12 CDT 2012


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1350651815 -7200
# Branch stable
# Node ID a029dac3894215ab566989050018b0b2fca35f8e
# Parent  e99a451270e67b0eb077b8fe82272e810825826e
test-push-http: fix failing test on Windows

The test failed due to problems with escaping. Fixes 8474be4412ca.

diff --git a/tests/test-push-http.t b/tests/test-push-http.t
--- a/tests/test-push-http.t
+++ b/tests/test-push-http.t
@@ -109,11 +109,13 @@
 
 expect push success, phase change failure
 
-  $ echo '[web]' > .hg/hgrc
-  $ echo 'push_ssl = false' >> .hg/hgrc
-  $ echo 'allow_push = *' >> .hg/hgrc
-  $ echo '[hooks]' >> .hg/hgrc
-  $ echo 'prepushkey = python "$TESTDIR/printenv.py" prepushkey 1' >> .hg/hgrc
+  $ cat > .hg/hgrc <<EOF
+  > [web]
+  > push_ssl = false
+  > allow_push = *
+  > [hooks]
+  > prepushkey = python "$TESTDIR/printenv.py" prepushkey 1
+  > EOF
   $ req
   pushing to http://localhost:$HGPORT/
   searching for changes
@@ -127,7 +129,7 @@
 
 expect phase change success
 
-  $ echo 'prepushkey = python "$TESTDIR/printenv.py" prepushkey 0' >> .hg/hgrc
+  $ echo "prepushkey = python \"$TESTDIR/printenv.py\" prepushkey 0" >> .hg/hgrc
   $ req
   pushing to http://localhost:$HGPORT/
   searching for changes


More information about the Mercurial-devel mailing list