Show More
@@ -39,13 +39,6 b' env = [k for k, v in os.environ.iteritem' | |||||
39 | if k.startswith("HG_") and v] |
|
39 | if k.startswith("HG_") and v] | |
40 | env.sort() |
|
40 | env.sort() | |
41 |
|
41 | |||
42 | # edit the variable part of the variable |
|
|||
43 | url = os.environ.get("HG_URL", "") |
|
|||
44 | if url.startswith("file:"): |
|
|||
45 | os.environ["HG_URL"] = "file:" |
|
|||
46 | elif url.startswith("remote:http"): |
|
|||
47 | os.environ["HG_URL"] = "remote:http" |
|
|||
48 |
|
||||
49 | out.write("%s hook: " % name) |
|
42 | out.write("%s hook: " % name) | |
50 | for v in env: |
|
43 | for v in env: | |
51 | out.write("%s=%s " % (v, os.environ[v])) |
|
44 | out.write("%s=%s " % (v, os.environ[v])) |
@@ -78,11 +78,11 b' test generic hooks' | |||||
78 |
|
78 | |||
79 | $ cd ../b |
|
79 | $ cd ../b | |
80 | $ hg pull ../a |
|
80 | $ hg pull ../a | |
81 | prechangegroup hook: HG_SOURCE=pull HG_URL=file: |
|
81 | prechangegroup hook: HG_SOURCE=pull HG_URL=file:$TESTTMP/a | |
82 | changegroup hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file: |
|
82 | changegroup hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file:$TESTTMP/a | |
83 | incoming hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file: |
|
83 | incoming hook: HG_NODE=ab228980c14deea8b9555d91c9581127383e40fd HG_SOURCE=pull HG_URL=file:$TESTTMP/a | |
84 | incoming hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_SOURCE=pull HG_URL=file: |
|
84 | incoming hook: HG_NODE=ee9deb46ab31e4cc3310f3cf0c3d668e4d8fffc2 HG_SOURCE=pull HG_URL=file:$TESTTMP/a | |
85 | incoming hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_URL=file: |
|
85 | incoming hook: HG_NODE=07f3376c1e655977439df2a814e3cc14b27abac2 HG_SOURCE=pull HG_URL=file:$TESTTMP/a | |
86 | pulling from ../a |
|
86 | pulling from ../a | |
87 | searching for changes |
|
87 | searching for changes | |
88 | adding changesets |
|
88 | adding changesets | |
@@ -178,7 +178,7 b' prechangegroup hook can prevent incoming' | |||||
178 | $ echo '[hooks]' > .hg/hgrc |
|
178 | $ echo '[hooks]' > .hg/hgrc | |
179 | $ echo 'prechangegroup.forbid = python ../printenv.py prechangegroup.forbid 1' >> .hg/hgrc |
|
179 | $ echo 'prechangegroup.forbid = python ../printenv.py prechangegroup.forbid 1' >> .hg/hgrc | |
180 | $ hg pull ../a |
|
180 | $ hg pull ../a | |
181 | prechangegroup.forbid hook: HG_SOURCE=pull HG_URL=file: |
|
181 | prechangegroup.forbid hook: HG_SOURCE=pull HG_URL=file:$TESTTMP/a | |
182 | pulling from ../a |
|
182 | pulling from ../a | |
183 | searching for changes |
|
183 | searching for changes | |
184 | abort: prechangegroup.forbid hook exited with status 1 |
|
184 | abort: prechangegroup.forbid hook exited with status 1 | |
@@ -192,7 +192,7 b' incoming changes no longer there after' | |||||
192 | $ echo 'pretxnchangegroup.forbid1 = python ../printenv.py pretxnchangegroup.forbid 1' >> .hg/hgrc |
|
192 | $ echo 'pretxnchangegroup.forbid1 = python ../printenv.py pretxnchangegroup.forbid 1' >> .hg/hgrc | |
193 | $ hg pull ../a |
|
193 | $ hg pull ../a | |
194 | 4:539e4b31b6dc |
|
194 | 4:539e4b31b6dc | |
195 | pretxnchangegroup.forbid hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/b HG_SOURCE=pull HG_URL=file: |
|
195 | pretxnchangegroup.forbid hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_PENDING=$TESTTMP/b HG_SOURCE=pull HG_URL=file:$TESTTMP/a | |
196 | pulling from ../a |
|
196 | pulling from ../a | |
197 | searching for changes |
|
197 | searching for changes | |
198 | adding changesets |
|
198 | adding changesets |
@@ -61,7 +61,7 b' expect success' | |||||
61 | remote: adding manifests |
|
61 | remote: adding manifests | |
62 | remote: adding file changes |
|
62 | remote: adding file changes | |
63 | remote: added 1 changesets with 1 changes to 1 files |
|
63 | remote: added 1 changesets with 1 changes to 1 files | |
64 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http |
|
64 | remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob) | |
65 | % serve errors |
|
65 | % serve errors | |
66 | $ hg rollback |
|
66 | $ hg rollback | |
67 | rolling back to revision 0 (undo serve) |
|
67 | rolling back to revision 0 (undo serve) |
General Comments 0
You need to be logged in to leave comments.
Login now