# HG changeset patch # User Mads Kiilerich # Date 1297728332 -3600 # Node ID 31a256ffe9e5941c167ac8347ca9173329ef33f8 # Parent 8ed91088acbb8e6f4fd86f5f7f3165a0947e112d tests: let printenv.py show the real values Test paths are now hidden by the test framework, so HG_URL no longer needs mangling. diff -r 8ed91088acbb -r 31a256ffe9e5 tests/printenv.py --- a/tests/printenv.py Tue Feb 15 01:04:10 2011 +0100 +++ b/tests/printenv.py Tue Feb 15 01:05:32 2011 +0100 @@ -39,13 +39,6 @@ if k.startswith("HG_") and v] env.sort() -# edit the variable part of the variable -url = os.environ.get("HG_URL", "") -if url.startswith("file:"): - os.environ["HG_URL"] = "file:" -elif url.startswith("remote:http"): - os.environ["HG_URL"] = "remote:http" - out.write("%s hook: " % name) for v in env: out.write("%s=%s " % (v, os.environ[v])) diff -r 8ed91088acbb -r 31a256ffe9e5 tests/test-hook.t --- a/tests/test-hook.t Tue Feb 15 01:04:10 2011 +0100 +++ b/tests/test-hook.t Tue Feb 15 01:05:32 2011 +0100 @@ -78,11 +78,11 @@ $ cd ../b $ hg pull ../a - prechangegroup hook: HG_SOURCE=pull HG_URL=file: - changegroup hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file: - incoming hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file: - incoming hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_SOURCE=pull HG_URL=file: - incoming hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_URL=file: + prechangegroup hook: HG_SOURCE=pull HG_URL=file:$TESTTMP/a + changegroup hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file:$TESTTMP/a + incoming hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file:$TESTTMP/a + incoming hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_SOURCE=pull HG_URL=file:$TESTTMP/a + incoming hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_URL=file:$TESTTMP/a pulling from ../a searching for changes adding changesets @@ -178,7 +178,7 @@ $ echo '[hooks]' > .hg/hgrc $ echo 'prechangegroup.forbid = python ../printenv.py prechangegroup.forbid 1' >> .hg/hgrc $ hg pull ../a - prechangegroup.forbid hook: HG_SOURCE=pull HG_URL=file: + prechangegroup.forbid hook: HG_SOURCE=pull HG_URL=file:$TESTTMP/a pulling from ../a searching for changes abort: prechangegroup.forbid hook exited with status 1 @@ -192,7 +192,7 @@ $ echo 'pretxnchangegroup.forbid1 = python ../printenv.py pretxnchangegroup.forbid 1' >> .hg/hgrc $ hg pull ../a 4:539e4b31b6dc - pretxnchangegroup.forbid hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/b HG_SOURCE=pull HG_URL=file: + pretxnchangegroup.forbid hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/b HG_SOURCE=pull HG_URL=file:$TESTTMP/a pulling from ../a searching for changes adding changesets diff -r 8ed91088acbb -r 31a256ffe9e5 tests/test-push-http.t --- a/tests/test-push-http.t Tue Feb 15 01:04:10 2011 +0100 +++ b/tests/test-push-http.t Tue Feb 15 01:05:32 2011 +0100 @@ -61,7 +61,7 @@ remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files - remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http + remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) % serve errors $ hg rollback rolling back to revision 0 (undo serve)