# HG changeset patch # User Matt Harbison # Date 1450304256 18000 # Node ID 52ae742c8035f0fafff6d47cf45a8ffd2c403de6 # Parent 912255f8f087386e40f4c7fd8ceee054f1a42bed tests: make `pwd` URL compatible on Windows in test-default-push Without this, the test fails with: $ hg -q commit -A -m 'add pushurl' abort: file:// URLs can only refer to localhost $ hg push abort: file:// URLs can only refer to localhost The variable $PWD causes check-code to complain, so avoid that. diff --git a/tests/test-default-push.t b/tests/test-default-push.t --- a/tests/test-default-push.t +++ b/tests/test-default-push.t @@ -75,10 +75,16 @@ $ hg -q clone a pushurlsource $ hg -q clone a pushurldest $ cd pushurlsource + +Windows needs a leading slash to make a URL that passes all of the checks + $ WD=`pwd` +#if windows + $ WD="/$WD" +#endif $ cat > .hg/hgrc << EOF > [paths] > default = https://example.com/not/relevant - > default:pushurl = file://`pwd`/../pushurldest + > default:pushurl = file://$WD/../pushurldest > EOF $ touch pushurl