diff --git a/tests/test-fetch b/tests/test-fetch --- a/tests/test-fetch +++ b/tests/test-fetch @@ -1,7 +1,7 @@ #!/bin/sh # adjust to non-default HGPORT, e.g. with run-tests.py -j -hideport() { sed "s/localhost:$HGPORT/localhost:20059/"; } +hideport() { sed "s/localhost:$HGPORT/localhost:\$HGPORT/"; } hidehash() { sed "s/changeset 3:............ merges/changeset 3:... merges/"; } echo "[extensions]" >> $HGRCPATH diff --git a/tests/test-fetch.out b/tests/test-fetch.out --- a/tests/test-fetch.out +++ b/tests/test-fetch.out @@ -36,7 +36,7 @@ a b c % fetch over http, no auth -pulling from http://localhost:20059/ +pulling from http://localhost:$HGPORT/ searching for changes adding changesets adding manifests @@ -47,9 +47,9 @@ 1 files updated, 0 files merged, 1 files merging with 1:5e056962225c 1 files updated, 0 files merged, 0 files removed, 0 files unresolved new changeset 3:... merges remote changes with local -Automated merge with http://localhost:20059/ +Automated merge with http://localhost:$HGPORT/ % fetch over http with auth (should be hidden in desc) -pulling from http://user:***@localhost:20059/ +pulling from http://user:***@localhost:$HGPORT/ searching for changes adding changesets adding manifests @@ -60,7 +60,7 @@ 1 files updated, 0 files merged, 1 files merging with 1:5e056962225c 1 files updated, 0 files merged, 0 files removed, 0 files unresolved new changeset 3:... merges remote changes with local -Automated merge with http://localhost:20059/ +Automated merge with http://localhost:$HGPORT/ updating to branch default 2 files updated, 0 files merged, 0 files removed, 0 files unresolved updating to branch default diff --git a/tests/test-http b/tests/test-http --- a/tests/test-http +++ b/tests/test-http @@ -14,7 +14,7 @@ hg commit -A -m 1 hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=../hg1.pid hg serve -p $HGPORT1 -d --pid-file=../hg2.pid # Test server address cannot be reused -hg serve -p $HGPORT1 2>&1 | sed -e "s/abort: cannot start server at ':$HGPORT1':.*/abort: cannot start server at ':20060':/" +hg serve -p $HGPORT1 2>&1 | sed -e "s/abort: cannot start server at ':$HGPORT1':.*/abort: cannot start server at ':\$HGPORT1':/" cd .. cat hg1.pid hg2.pid >> $DAEMON_PIDS @@ -39,5 +39,5 @@ echo % pull cd copy-pull echo '[hooks]' >> .hg/hgrc echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc -hg pull | sed -e 's,:[0-9][0-9]*/,/,' +hg pull | sed -e "s,:$HGPORT1/,:\$HGPORT1/," cd .. diff --git a/tests/test-http-clone-r b/tests/test-http-clone-r --- a/tests/test-http-clone-r +++ b/tests/test-http-clone-r @@ -66,14 +66,14 @@ hg pull ../test-7 hg verify cd .. cd test-1 -hg pull -r 4 http://localhost:$HGPORT/ 2>&1 | sed -e 's,:[0-9][0-9]*/,/,' +hg pull -r 4 http://localhost:$HGPORT/ 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/," hg verify -hg pull http://localhost:$HGPORT/ 2>&1 | sed -e 's,:[0-9][0-9]*/,/,' +hg pull http://localhost:$HGPORT/ 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/," cd .. cd test-2 -hg pull -r 5 http://localhost:$HGPORT/ 2>&1 | sed -e 's,:[0-9][0-9]*/,/,' +hg pull -r 5 http://localhost:$HGPORT/ 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/," hg verify -hg pull http://localhost:$HGPORT/ 2>&1 | sed -e 's,:[0-9][0-9]*/,/,' +hg pull http://localhost:$HGPORT/ 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/," hg verify cd .. cat error.log diff --git a/tests/test-http-clone-r.out b/tests/test-http-clone-r.out --- a/tests/test-http-clone-r.out +++ b/tests/test-http-clone-r.out @@ -148,7 +148,7 @@ checking manifests crosschecking files in changesets and manifests checking files 4 files, 9 changesets, 7 total revisions -pulling from http://localhost/ +pulling from http://localhost:$HGPORT/ searching for changes adding changesets adding manifests @@ -160,14 +160,14 @@ checking manifests crosschecking files in changesets and manifests checking files 1 files, 3 changesets, 2 total revisions -pulling from http://localhost/ +pulling from http://localhost:$HGPORT/ searching for changes adding changesets adding manifests adding file changes added 6 changesets with 5 changes to 4 files (run 'hg update' to get a working copy) -pulling from http://localhost/ +pulling from http://localhost:$HGPORT/ searching for changes adding changesets adding manifests @@ -179,7 +179,7 @@ checking manifests crosschecking files in changesets and manifests checking files 1 files, 5 changesets, 3 total revisions -pulling from http://localhost/ +pulling from http://localhost:$HGPORT/ searching for changes adding changesets adding manifests diff --git a/tests/test-http.out b/tests/test-http.out --- a/tests/test-http.out +++ b/tests/test-http.out @@ -2,7 +2,7 @@ adding foo adding foo.d/bAr.hg.d/BaR adding foo.d/baR.d.hg/bAR adding foo.d/foo -abort: cannot start server at ':20060': +abort: cannot start server at ':$HGPORT1': % clone via stream streaming all changes XXX files to transfer, XXX bytes of data @@ -37,8 +37,8 @@ checking files 4 files, 1 changesets, 4 total revisions adding bar % pull -changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=http://localhost/ -pulling from http://localhost/ +changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=http://localhost:$HGPORT1/ +pulling from http://localhost:$HGPORT1/ searching for changes adding changesets adding manifests diff --git a/tests/test-incoming-outgoing b/tests/test-incoming-outgoing --- a/tests/test-incoming-outgoing +++ b/tests/test-incoming-outgoing @@ -14,8 +14,8 @@ cd .. hg init new # http incoming -hg -R new incoming http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' -hg -R new incoming -r 4 http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' +hg -R new incoming http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," +hg -R new incoming -r 4 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," # local incoming hg -R new incoming test hg -R new incoming -r 4 test @@ -25,7 +25,7 @@ echo "% limit to 2 changesets, test with hg -R new incoming -l 2 -p --git test # test with --bundle -hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' +hg -R new incoming --bundle test.hg http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," hg -R new incoming --bundle test2.hg test # test the resulting bundles @@ -50,5 +50,5 @@ cd .. hg -R test-dev outgoing test echo "% limit to 3 changesets" hg -R test-dev outgoing -l 3 test -hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' -hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' +hg -R test-dev outgoing http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," +hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," diff --git a/tests/test-incoming-outgoing.out b/tests/test-incoming-outgoing.out --- a/tests/test-incoming-outgoing.out +++ b/tests/test-incoming-outgoing.out @@ -4,7 +4,7 @@ checking manifests crosschecking files in changesets and manifests checking files 1 files, 9 changesets, 9 total revisions -comparing with http://localhost/ +comparing with http://localhost:$HGPORT/ changeset: 0:9cb21d99fe27 user: test date: Mon Jan 12 13:46:40 1970 +0000 @@ -51,7 +51,7 @@ user: test date: Mon Jan 12 13:46:40 1970 +0000 summary: 8 -comparing with http://localhost/ +comparing with http://localhost:$HGPORT/ changeset: 0:9cb21d99fe27 user: test date: Mon Jan 12 13:46:40 1970 +0000 @@ -189,7 +189,7 @@ diff --git a/foo b/foo 0 +1 -comparing with http://localhost/ +comparing with http://localhost:$HGPORT/ changeset: 0:9cb21d99fe27 user: test date: Mon Jan 12 13:46:40 1970 +0000 @@ -358,7 +358,7 @@ user: test date: Mon Jan 12 13:46:40 1970 +0000 summary: 11 -comparing with http://localhost/ +comparing with http://localhost:$HGPORT/ searching for changes changeset: 9:3741c3ad1096 user: test @@ -386,7 +386,7 @@ user: test date: Mon Jan 12 13:46:40 1970 +0000 summary: 13 -comparing with http://localhost/ +comparing with http://localhost:$HGPORT/ searching for changes changeset: 9:3741c3ad1096 user: test diff --git a/tests/test-pull b/tests/test-pull --- a/tests/test-pull +++ b/tests/test-pull @@ -11,13 +11,13 @@ hg serve -p $HGPORT -d --pid-file=hg.pid cat hg.pid >> $DAEMON_PIDS cd .. -hg clone --pull http://localhost:$HGPORT/ copy | sed -e 's,:[0-9][0-9]*/,/,' +hg clone --pull http://localhost:$HGPORT/ copy | sed -e "s,:$HGPORT/,:\$HGPORT/," cd copy hg verify hg co cat foo hg manifest --debug -hg pull | sed -e 's,:[0-9][0-9]*/,/,' +hg pull | sed -e "s,:$HGPORT/,:\$HGPORT/," echo % issue 622 cd .. diff --git a/tests/test-pull-http b/tests/test-pull-http --- a/tests/test-pull-http +++ b/tests/test-pull-http @@ -18,7 +18,7 @@ echo '[web]' > .hg/hgrc echo 'allowpull = false' >> .hg/hgrc hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log cat hg.pid >> $DAEMON_PIDS -hg clone http://localhost:$HGPORT/ test3 | sed -e 's,:[0-9][0-9]*/,/,' +hg clone http://localhost:$HGPORT/ test3 | sed -e "s,:$HGPORT/,:\$HGPORT/," "$TESTDIR/killdaemons.py" echo % serve errors cat errors.log @@ -26,7 +26,7 @@ cat errors.log req() { hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log cat hg.pid >> $DAEMON_PIDS - hg --cwd ../test pull http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' + hg --cwd ../test pull http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," kill `cat hg.pid` echo % serve errors cat errors.log diff --git a/tests/test-pull-http.out b/tests/test-pull-http.out --- a/tests/test-pull-http.out +++ b/tests/test-pull-http.out @@ -7,6 +7,6 @@ requesting all changes % serve errors % expect error, pulling not allowed abort: authorization failed -pulling from http://localhost/ +pulling from http://localhost:$HGPORT/ searching for changes % serve errors diff --git a/tests/test-pull.out b/tests/test-pull.out --- a/tests/test-pull.out +++ b/tests/test-pull.out @@ -19,7 +19,7 @@ 1 files, 1 changesets, 1 total revisions 0 files updated, 0 files merged, 0 files removed, 0 files unresolved foo 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo -pulling from http://localhost/ +pulling from http://localhost:$HGPORT/ searching for changes no changes found % issue 622 diff --git a/tests/test-push-http b/tests/test-push-http --- a/tests/test-push-http +++ b/tests/test-push-http @@ -16,7 +16,7 @@ hg ci -mb req() { hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log cat hg.pid >> $DAEMON_PIDS - hg --cwd ../test2 push http://localhost:$HGPORT/ | sed -e 's,:[0-9][0-9]*/,/,' + hg --cwd ../test2 push http://localhost:$HGPORT/ | sed -e "s,:$HGPORT/,:\$HGPORT/," kill `cat hg.pid` echo % serve errors cat errors.log diff --git a/tests/test-push-http.out b/tests/test-push-http.out --- a/tests/test-push-http.out +++ b/tests/test-push-http.out @@ -2,22 +2,22 @@ adding a updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved % expect ssl error -pushing to http://localhost/ +pushing to http://localhost:$HGPORT/ searching for changes ssl required % serve errors % expect authorization error abort: authorization failed -pushing to http://localhost/ +pushing to http://localhost:$HGPORT/ searching for changes % serve errors % expect authorization error: must have authorized user abort: authorization failed -pushing to http://localhost/ +pushing to http://localhost:$HGPORT/ searching for changes % serve errors % expect success -pushing to http://localhost/ +pushing to http://localhost:$HGPORT/ searching for changes adding changesets adding manifests @@ -28,11 +28,11 @@ changegroup hook: HG_NODE=ba677d0156c119 rolling back last transaction % expect authorization error: all users denied abort: authorization failed -pushing to http://localhost/ +pushing to http://localhost:$HGPORT/ searching for changes % serve errors % expect authorization error: some users denied, users must be authenticated abort: authorization failed -pushing to http://localhost/ +pushing to http://localhost:$HGPORT/ searching for changes % serve errors diff --git a/tests/test-static-http b/tests/test-static-http --- a/tests/test-static-http +++ b/tests/test-static-http @@ -34,7 +34,7 @@ hg tip cd .. -hg clone static-http://localhost:$HGPORT/remote local | sed -e 's,:[0-9][0-9]*/,/,' +hg clone static-http://localhost:$HGPORT/remote local | sed -e "s,:$HGPORT/,:\$HGPORT/," cd local hg verify @@ -47,13 +47,13 @@ hg commit -A -mtest2 -d '100000000 0' cd ../local echo '[hooks]' >> .hg/hgrc echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc -hg pull | sed -e 's,:[0-9][0-9]*/,/,' +hg pull | sed -e "s,:$HGPORT/,:\$HGPORT/," echo '% trying to push' hg update echo more foo >> bar hg commit -m"test" -d "100000000 0" -hg push | sed -e 's,:[0-9][0-9]*/,/,' +hg push | sed -e "s,:$HGPORT/,:\$HGPORT/," echo '% test with "/" URI (issue 747)' cd .. @@ -62,26 +62,26 @@ echo a > a hg add a hg ci -ma -hg clone static-http://localhost:$HGPORT/ local2 | sed -e 's,:[0-9][0-9]*/,/,' +hg clone static-http://localhost:$HGPORT/ local2 | sed -e "s,:$HGPORT/,:\$HGPORT/," cd local2 hg verify cat a -hg paths | sed -e 's,:[0-9][0-9]*/,/,' +hg paths | sed -e "s,:$HGPORT/,:\$HGPORT/," echo '% test with empty repo (issue965)' cd .. hg init remotempty -hg clone static-http://localhost:$HGPORT/remotempty local3 | sed -e 's,:[0-9][0-9]*/,/,' +hg clone static-http://localhost:$HGPORT/remotempty local3 | sed -e "s,:$HGPORT/,:\$HGPORT/," cd local3 hg verify -hg paths | sed -e 's,:[0-9][0-9]*/,/,' +hg paths | sed -e "s,:$HGPORT/,:\$HGPORT/," echo '% test with non-repo' cd .. mkdir notarepo -hg clone static-http://localhost:$HGPORT/notarepo local3 2>&1 | sed -e 's,:[0-9][0-9]*/,/,' +hg clone static-http://localhost:$HGPORT/notarepo local3 2>&1 | sed -e "s,:$HGPORT/,:\$HGPORT/," kill $! diff --git a/tests/test-static-http.out b/tests/test-static-http.out --- a/tests/test-static-http.out +++ b/tests/test-static-http.out @@ -21,8 +21,8 @@ checking files 1 files, 1 changesets, 1 total revisions foo adding quux -changegroup hook: HG_NODE=34401e0e9971e9720b613d9089ffa9a6eefb3d2d HG_SOURCE=pull HG_URL=http://localhost/remote -pulling from static-http://localhost/remote +changegroup hook: HG_NODE=34401e0e9971e9720b613d9089ffa9a6eefb3d2d HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote +pulling from static-http://localhost:$HGPORT/remote searching for changes adding changesets adding manifests @@ -32,7 +32,7 @@ added 1 changesets with 1 changes to 1 f % trying to push 1 files updated, 0 files merged, 0 files removed, 0 files unresolved abort: cannot lock static-http repository -pushing to static-http://localhost/remote +pushing to static-http://localhost:$HGPORT/remote % test with "/" URI (issue 747) requesting all changes adding changesets @@ -47,7 +47,7 @@ crosschecking files in changesets and ma checking files 1 files, 1 changesets, 1 total revisions a -default = static-http://localhost/ +default = static-http://localhost:$HGPORT/ % test with empty repo (issue965) no changes found updating to branch default @@ -57,6 +57,6 @@ checking manifests crosschecking files in changesets and manifests checking files 0 files, 0 changesets, 0 total revisions -default = static-http://localhost/remotempty +default = static-http://localhost:$HGPORT/remotempty % test with non-repo -abort: 'http://localhost/notarepo' does not appear to be an hg repository! +abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository!