Show More
@@ -216,8 +216,10 b" Make sure bundlerepo doesn't leak tempfi" | |||||
216 |
|
216 | |||
217 | Pull ../full.hg into empty (with hook) |
|
217 | Pull ../full.hg into empty (with hook) | |
218 |
|
218 | |||
219 |
$ |
|
219 | $ cat >> .hg/hgrc <<EOF | |
220 | $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc |
|
220 | > [hooks] | |
|
221 | > changegroup = sh -c "printenv.py changegroup" | |||
|
222 | > EOF | |||
221 |
|
223 | |||
222 | doesn't work (yet ?) |
|
224 | doesn't work (yet ?) | |
223 |
|
225 |
@@ -16,9 +16,9 b' commit hooks can see env vars' | |||||
16 | > precommit = sh -c "HG_LOCAL= HG_NODE= HG_TAG= printenv.py precommit" |
|
16 | > precommit = sh -c "HG_LOCAL= HG_NODE= HG_TAG= printenv.py precommit" | |
17 | > pretxncommit = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxncommit" |
|
17 | > pretxncommit = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxncommit" | |
18 | > pretxncommit.tip = hg -q tip |
|
18 | > pretxncommit.tip = hg -q tip | |
19 |
> pre-identify = |
|
19 | > pre-identify = sh -c "printenv.py pre-identify 1" | |
20 |
> pre-cat = |
|
20 | > pre-cat = sh -c "printenv.py pre-cat" | |
21 |
> post-cat = |
|
21 | > post-cat = sh -c "printenv.py post-cat" | |
22 | > pretxnopen = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxnopen" |
|
22 | > pretxnopen = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxnopen" | |
23 | > pretxnclose = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxnclose" |
|
23 | > pretxnclose = sh -c "HG_LOCAL= HG_TAG= printenv.py pretxnclose" | |
24 | > txnclose = sh -c "HG_LOCAL= HG_TAG= printenv.py txnclose" |
|
24 | > txnclose = sh -c "HG_LOCAL= HG_TAG= printenv.py txnclose" | |
@@ -47,9 +47,9 b' changegroup hooks can see env vars' | |||||
47 |
|
47 | |||
48 | $ cat > .hg/hgrc <<EOF |
|
48 | $ cat > .hg/hgrc <<EOF | |
49 | > [hooks] |
|
49 | > [hooks] | |
50 |
> prechangegroup = |
|
50 | > prechangegroup = sh -c "printenv.py prechangegroup" | |
51 |
> changegroup = |
|
51 | > changegroup = sh -c "printenv.py changegroup" | |
52 |
> incoming = |
|
52 | > incoming = sh -c "printenv.py incoming" | |
53 | > EOF |
|
53 | > EOF | |
54 |
|
54 | |||
55 | pretxncommit and commit hooks can see both parents of merge |
|
55 | pretxncommit and commit hooks can see both parents of merge | |
@@ -122,7 +122,7 b' tag hooks can see env vars' | |||||
122 |
|
122 | |||
123 | $ cd ../a |
|
123 | $ cd ../a | |
124 | $ cat >> .hg/hgrc <<EOF |
|
124 | $ cat >> .hg/hgrc <<EOF | |
125 |
> pretag = |
|
125 | > pretag = sh -c "printenv.py pretag" | |
126 | > tag = sh -c "HG_PARENT1= HG_PARENT2= printenv.py tag" |
|
126 | > tag = sh -c "HG_PARENT1= HG_PARENT2= printenv.py tag" | |
127 | > EOF |
|
127 | > EOF | |
128 | $ hg tag -d '3 0' a |
|
128 | $ hg tag -d '3 0' a | |
@@ -142,7 +142,9 b' tag hooks can see env vars' | |||||
142 |
|
142 | |||
143 | pretag hook can forbid tagging |
|
143 | pretag hook can forbid tagging | |
144 |
|
144 | |||
145 | $ echo "pretag.forbid = printenv.py pretag.forbid 1" >> .hg/hgrc |
|
145 | $ cat >> .hg/hgrc <<EOF | |
|
146 | > pretag.forbid = sh -c "printenv.py pretag.forbid 1" | |||
|
147 | > EOF | |||
146 |
$ hg tag -d '4 |
|
148 | $ hg tag -d '4 0' fa | |
147 | pretag hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa |
|
149 | pretag hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa | |
148 | pretag.forbid hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa |
|
150 | pretag.forbid hook: HG_LOCAL=0 HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_TAG=fa | |
@@ -157,8 +159,10 b' pretag hook can forbid tagging' | |||||
157 | pretxncommit hook can see changeset, can roll back txn, changeset no |
|
159 | pretxncommit hook can see changeset, can roll back txn, changeset no | |
158 | more there after |
|
160 | more there after | |
159 |
|
161 | |||
160 | $ echo "pretxncommit.forbid0 = hg tip -q" >> .hg/hgrc |
|
162 | $ cat >> .hg/hgrc <<EOF | |
161 | $ echo "pretxncommit.forbid1 = printenv.py pretxncommit.forbid 1" >> .hg/hgrc |
|
163 | > pretxncommit.forbid0 = sh -c "hg tip -q" | |
|
164 | > pretxncommit.forbid1 = sh -c "printenv.py pretxncommit.forbid 1" | |||
|
165 | > EOF | |||
162 | $ echo z > z |
|
166 | $ echo z > z | |
163 | $ hg add z |
|
167 | $ hg add z | |
164 | $ hg -q tip |
|
168 | $ hg -q tip | |
@@ -196,7 +200,9 b' more there after' | |||||
196 |
|
200 | |||
197 | precommit hook can prevent commit |
|
201 | precommit hook can prevent commit | |
198 |
|
202 | |||
199 | $ echo "precommit.forbid = printenv.py precommit.forbid 1" >> .hg/hgrc |
|
203 | $ cat >> .hg/hgrc <<EOF | |
|
204 | > precommit.forbid = sh -c "printenv.py precommit.forbid 1" | |||
|
205 | > EOF | |||
200 | $ hg commit -m 'fail' -d '4 0' |
|
206 | $ hg commit -m 'fail' -d '4 0' | |
201 | precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 |
|
207 | precommit hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | |
202 | precommit.forbid hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 |
|
208 | precommit.forbid hook: HG_PARENT1=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 | |
@@ -207,14 +213,18 b' precommit hook can prevent commit' | |||||
207 |
|
213 | |||
208 | preupdate hook can prevent update |
|
214 | preupdate hook can prevent update | |
209 |
|
215 | |||
210 | $ echo "preupdate = printenv.py preupdate" >> .hg/hgrc |
|
216 | $ cat >> .hg/hgrc <<EOF | |
|
217 | > preupdate = sh -c "printenv.py preupdate" | |||
|
218 | > EOF | |||
211 | $ hg update 1 |
|
219 | $ hg update 1 | |
212 | preupdate hook: HG_PARENT1=ab228980c14d |
|
220 | preupdate hook: HG_PARENT1=ab228980c14d | |
213 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
221 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
214 |
|
222 | |||
215 | update hook |
|
223 | update hook | |
216 |
|
224 | |||
217 | $ echo "update = printenv.py update" >> .hg/hgrc |
|
225 | $ cat >> .hg/hgrc <<EOF | |
|
226 | > update = sh -c "printenv.py update" | |||
|
227 | > EOF | |||
218 | $ hg update |
|
228 | $ hg update | |
219 | preupdate hook: HG_PARENT1=539e4b31b6dc |
|
229 | preupdate hook: HG_PARENT1=539e4b31b6dc | |
220 | update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc |
|
230 | update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc | |
@@ -222,7 +232,9 b' update hook' | |||||
222 |
|
232 | |||
223 | pushkey hook |
|
233 | pushkey hook | |
224 |
|
234 | |||
225 | $ echo "pushkey = printenv.py pushkey" >> .hg/hgrc |
|
235 | $ cat >> .hg/hgrc <<EOF | |
|
236 | > pushkey = sh -c "printenv.py pushkey" | |||
|
237 | > EOF | |||
226 | $ cd ../b |
|
238 | $ cd ../b | |
227 | $ hg bookmark -r null foo |
|
239 | $ hg bookmark -r null foo | |
228 | $ hg push -B foo ../a |
|
240 | $ hg push -B foo ../a | |
@@ -239,7 +251,9 b' pushkey hook' | |||||
239 |
|
251 | |||
240 | listkeys hook |
|
252 | listkeys hook | |
241 |
|
253 | |||
242 | $ echo "listkeys = printenv.py listkeys" >> .hg/hgrc |
|
254 | $ cat >> .hg/hgrc <<EOF | |
|
255 | > listkeys = sh -c "printenv.py listkeys" | |||
|
256 | > EOF | |||
243 | $ hg bookmark -r null bar |
|
257 | $ hg bookmark -r null bar | |
244 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=bookmark (glob) |
|
258 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=bookmark (glob) | |
245 | pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=bookmark (glob) |
|
259 | pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=bookmark (glob) | |
@@ -255,7 +269,9 b' listkeys hook' | |||||
255 |
|
269 | |||
256 | test that prepushkey can prevent incoming keys |
|
270 | test that prepushkey can prevent incoming keys | |
257 |
|
271 | |||
258 | $ echo "prepushkey = printenv.py prepushkey.forbid 1" >> .hg/hgrc |
|
272 | $ cat >> .hg/hgrc <<EOF | |
|
273 | > prepushkey = sh -c "printenv.py prepushkey.forbid 1" | |||
|
274 | > EOF | |||
259 | $ cd ../b |
|
275 | $ cd ../b | |
260 | $ hg bookmark -r null baz |
|
276 | $ hg bookmark -r null baz | |
261 | $ hg push -B baz ../a |
|
277 | $ hg push -B baz ../a | |
@@ -273,7 +289,9 b' test that prepushkey can prevent incomin' | |||||
273 |
|
289 | |||
274 | test that prelistkeys can prevent listing keys |
|
290 | test that prelistkeys can prevent listing keys | |
275 |
|
291 | |||
276 | $ echo "prelistkeys = printenv.py prelistkeys.forbid 1" >> .hg/hgrc |
|
292 | $ cat >> .hg/hgrc <<EOF | |
|
293 | > prelistkeys = sh -c "printenv.py prelistkeys.forbid 1" | |||
|
294 | > EOF | |||
277 | $ hg bookmark -r null quux |
|
295 | $ hg bookmark -r null quux | |
278 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=bookmark (glob) |
|
296 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=bookmark (glob) | |
279 | pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=bookmark (glob) |
|
297 | pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME=bookmark (glob) | |
@@ -294,7 +312,7 b' prechangegroup hook can prevent incoming' | |||||
294 | 3:07f3376c1e65 |
|
312 | 3:07f3376c1e65 | |
295 | $ cat > .hg/hgrc <<EOF |
|
313 | $ cat > .hg/hgrc <<EOF | |
296 | > [hooks] |
|
314 | > [hooks] | |
297 |
> prechangegroup.forbid = |
|
315 | > prechangegroup.forbid = sh -c "printenv.py prechangegroup.forbid 1" | |
298 | > EOF |
|
316 | > EOF | |
299 | $ hg pull ../a |
|
317 | $ hg pull ../a | |
300 | pulling from ../a |
|
318 | pulling from ../a | |
@@ -309,7 +327,7 b' incoming changes no longer there after' | |||||
309 | $ cat > .hg/hgrc <<EOF |
|
327 | $ cat > .hg/hgrc <<EOF | |
310 | > [hooks] |
|
328 | > [hooks] | |
311 | > pretxnchangegroup.forbid0 = hg tip -q |
|
329 | > pretxnchangegroup.forbid0 = hg tip -q | |
312 |
> pretxnchangegroup.forbid1 = |
|
330 | > pretxnchangegroup.forbid1 = sh -c "printenv.py pretxnchangegroup.forbid 1" | |
313 | > EOF |
|
331 | > EOF | |
314 | $ hg pull ../a |
|
332 | $ hg pull ../a | |
315 | pulling from ../a |
|
333 | pulling from ../a | |
@@ -332,8 +350,8 b' outgoing hooks can see env vars' | |||||
332 | $ rm .hg/hgrc |
|
350 | $ rm .hg/hgrc | |
333 | $ cat > ../a/.hg/hgrc <<EOF |
|
351 | $ cat > ../a/.hg/hgrc <<EOF | |
334 | > [hooks] |
|
352 | > [hooks] | |
335 |
> preoutgoing = |
|
353 | > preoutgoing = sh -c "printenv.py preoutgoing" | |
336 |
> outgoing = |
|
354 | > outgoing = sh -c "printenv.py outgoing" | |
337 | > EOF |
|
355 | > EOF | |
338 | $ hg pull ../a |
|
356 | $ hg pull ../a | |
339 | pulling from ../a |
|
357 | pulling from ../a | |
@@ -351,7 +369,9 b' outgoing hooks can see env vars' | |||||
351 |
|
369 | |||
352 | preoutgoing hook can prevent outgoing changes |
|
370 | preoutgoing hook can prevent outgoing changes | |
353 |
|
371 | |||
354 | $ echo "preoutgoing.forbid = printenv.py preoutgoing.forbid 1" >> ../a/.hg/hgrc |
|
372 | $ cat >> ../a/.hg/hgrc <<EOF | |
|
373 | > preoutgoing.forbid = sh -c "printenv.py preoutgoing.forbid 1" | |||
|
374 | > EOF | |||
355 | $ hg pull ../a |
|
375 | $ hg pull ../a | |
356 | pulling from ../a |
|
376 | pulling from ../a | |
357 | searching for changes |
|
377 | searching for changes | |
@@ -365,8 +385,8 b' outgoing hooks work for local clones' | |||||
365 | $ cd .. |
|
385 | $ cd .. | |
366 | $ cat > a/.hg/hgrc <<EOF |
|
386 | $ cat > a/.hg/hgrc <<EOF | |
367 | > [hooks] |
|
387 | > [hooks] | |
368 |
> preoutgoing = |
|
388 | > preoutgoing = sh -c "printenv.py preoutgoing" | |
369 |
> outgoing = |
|
389 | > outgoing = sh -c "printenv.py outgoing" | |
370 | > EOF |
|
390 | > EOF | |
371 | $ hg clone a c |
|
391 | $ hg clone a c | |
372 | preoutgoing hook: HG_SOURCE=clone |
|
392 | preoutgoing hook: HG_SOURCE=clone | |
@@ -377,7 +397,9 b' outgoing hooks work for local clones' | |||||
377 |
|
397 | |||
378 | preoutgoing hook can prevent outgoing changes for local clones |
|
398 | preoutgoing hook can prevent outgoing changes for local clones | |
379 |
|
399 | |||
380 | $ echo "preoutgoing.forbid = printenv.py preoutgoing.forbid 1" >> a/.hg/hgrc |
|
400 | $ cat >> a/.hg/hgrc <<EOF | |
|
401 | > preoutgoing.forbid = sh -c "printenv.py preoutgoing.forbid 1" | |||
|
402 | > EOF | |||
381 | $ hg clone a zzz |
|
403 | $ hg clone a zzz | |
382 | preoutgoing hook: HG_SOURCE=clone |
|
404 | preoutgoing hook: HG_SOURCE=clone | |
383 | preoutgoing.forbid hook: HG_SOURCE=clone |
|
405 | preoutgoing.forbid hook: HG_SOURCE=clone | |
@@ -750,7 +772,7 b' This also creates the `to` repo for the ' | |||||
750 | $ cd .. |
|
772 | $ cd .. | |
751 | $ cat << EOF >> hgrc-with-post-init-hook |
|
773 | $ cat << EOF >> hgrc-with-post-init-hook | |
752 | > [hooks] |
|
774 | > [hooks] | |
753 | > post-init = printenv.py post-init |
|
775 | > post-init = sh -c "printenv.py post-init" | |
754 | > EOF |
|
776 | > EOF | |
755 | $ HGRCPATH=hgrc-with-post-init-hook hg init to |
|
777 | $ HGRCPATH=hgrc-with-post-init-hook hg init to | |
756 | post-init hook: HG_ARGS=init to HG_OPTS={'insecure': None, 'remotecmd': '', 'ssh': ''} HG_PATS=['to'] HG_RESULT=0 |
|
778 | post-init hook: HG_ARGS=init to HG_OPTS={'insecure': None, 'remotecmd': '', 'ssh': ''} HG_PATS=['to'] HG_RESULT=0 |
@@ -127,8 +127,10 b' incoming via HTTP' | |||||
127 | pull |
|
127 | pull | |
128 |
|
128 | |||
129 | $ cd copy-pull |
|
129 | $ cd copy-pull | |
130 |
$ |
|
130 | $ cat >> .hg/hgrc <<EOF | |
131 | $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc |
|
131 | > [hooks] | |
|
132 | > changegroup = sh -c "printenv.py changegroup" | |||
|
133 | > EOF | |||
132 | $ hg pull |
|
134 | $ hg pull | |
133 | pulling from http://localhost:$HGPORT1/ |
|
135 | pulling from http://localhost:$HGPORT1/ | |
134 | searching for changes |
|
136 | searching for changes |
@@ -118,8 +118,10 b' incoming via HTTP' | |||||
118 | pull |
|
118 | pull | |
119 |
|
119 | |||
120 | $ cd copy-pull |
|
120 | $ cd copy-pull | |
121 |
$ |
|
121 | $ cat >> .hg/hgrc <<EOF | |
122 | $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc |
|
122 | > [hooks] | |
|
123 | > changegroup = sh -c "printenv.py changegroup" | |||
|
124 | > EOF | |||
123 | $ hg pull |
|
125 | $ hg pull | |
124 | pulling from http://localhost:$HGPORT1/ |
|
126 | pulling from http://localhost:$HGPORT1/ | |
125 | searching for changes |
|
127 | searching for changes |
@@ -203,8 +203,10 b' Inability to verify peer certificate wil' | |||||
203 | pull without cacert |
|
203 | pull without cacert | |
204 |
|
204 | |||
205 | $ cd copy-pull |
|
205 | $ cd copy-pull | |
206 |
$ |
|
206 | $ cat >> .hg/hgrc <<EOF | |
207 | $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc |
|
207 | > [hooks] | |
|
208 | > changegroup = sh -c "printenv.py changegroup" | |||
|
209 | > EOF | |||
208 | $ hg pull $DISABLECACERTS |
|
210 | $ hg pull $DISABLECACERTS | |
209 | pulling from https://localhost:$HGPORT/ |
|
211 | pulling from https://localhost:$HGPORT/ | |
210 | warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?) |
|
212 | warning: connecting to localhost using legacy security technology (TLS 1.0); see https://mercurial-scm.org/wiki/SecureConnections for more info (?) |
@@ -66,10 +66,12 b' expect authorization error: must have au' | |||||
66 |
|
66 | |||
67 | expect success |
|
67 | expect success | |
68 |
|
68 | |||
69 | $ echo 'allow_push = *' >> .hg/hgrc |
|
69 | $ cat >> .hg/hgrc <<EOF | |
70 | $ echo '[hooks]' >> .hg/hgrc |
|
70 | > allow_push = * | |
71 | $ echo "changegroup = printenv.py changegroup 0" >> .hg/hgrc |
|
71 | > [hooks] | |
72 | $ echo "pushkey = printenv.py pushkey 0" >> .hg/hgrc |
|
72 | > changegroup = sh -c "printenv.py changegroup 0" | |
|
73 | > pushkey = sh -c "printenv.py pushkey 0" | |||
|
74 | > EOF | |||
73 | $ req |
|
75 | $ req | |
74 | pushing to http://localhost:$HGPORT/ |
|
76 | pushing to http://localhost:$HGPORT/ | |
75 | searching for changes |
|
77 | searching for changes | |
@@ -151,7 +153,7 b' expect push success, phase change failur' | |||||
151 | > push_ssl = false |
|
153 | > push_ssl = false | |
152 | > allow_push = * |
|
154 | > allow_push = * | |
153 | > [hooks] |
|
155 | > [hooks] | |
154 |
> prepushkey = |
|
156 | > prepushkey = sh -c "printenv.py prepushkey 1" | |
155 | > EOF |
|
157 | > EOF | |
156 | $ req |
|
158 | $ req | |
157 | pushing to http://localhost:$HGPORT/ |
|
159 | pushing to http://localhost:$HGPORT/ | |
@@ -164,7 +166,9 b' expect push success, phase change failur' | |||||
164 |
|
166 | |||
165 | expect phase change success |
|
167 | expect phase change success | |
166 |
|
168 | |||
167 | $ echo "prepushkey = printenv.py prepushkey 0" >> .hg/hgrc |
|
169 | $ cat >> .hg/hgrc <<EOF | |
|
170 | > prepushkey = sh -c "printenv.py prepushkey 0" | |||
|
171 | > EOF | |||
168 | $ req |
|
172 | $ req | |
169 | pushing to http://localhost:$HGPORT/ |
|
173 | pushing to http://localhost:$HGPORT/ | |
170 | searching for changes |
|
174 | searching for changes |
@@ -56,10 +56,12 b' expect authorization error: must have au' | |||||
56 |
|
56 | |||
57 | expect success |
|
57 | expect success | |
58 |
|
58 | |||
59 | $ echo 'allow_push = *' >> .hg/hgrc |
|
59 | $ cat >> .hg/hgrc <<EOF | |
60 | $ echo '[hooks]' >> .hg/hgrc |
|
60 | > allow_push = * | |
61 | $ echo "changegroup = printenv.py changegroup 0" >> .hg/hgrc |
|
61 | > [hooks] | |
62 | $ echo "pushkey = printenv.py pushkey 0" >> .hg/hgrc |
|
62 | > changegroup = sh -c "printenv.py changegroup 0" | |
|
63 | > pushkey = sh -c "printenv.py pushkey 0" | |||
|
64 | > EOF | |||
63 | $ req |
|
65 | $ req | |
64 | pushing to http://localhost:$HGPORT/ |
|
66 | pushing to http://localhost:$HGPORT/ | |
65 | searching for changes |
|
67 | searching for changes | |
@@ -114,7 +116,7 b' expect push success, phase change failur' | |||||
114 | > push_ssl = false |
|
116 | > push_ssl = false | |
115 | > allow_push = * |
|
117 | > allow_push = * | |
116 | > [hooks] |
|
118 | > [hooks] | |
117 |
> prepushkey = |
|
119 | > prepushkey = sh -c "printenv.py prepushkey 1" | |
118 | > EOF |
|
120 | > EOF | |
119 | $ req |
|
121 | $ req | |
120 | pushing to http://localhost:$HGPORT/ |
|
122 | pushing to http://localhost:$HGPORT/ | |
@@ -133,7 +135,9 b' expect push success, phase change failur' | |||||
133 |
|
135 | |||
134 | expect phase change success |
|
136 | expect phase change success | |
135 |
|
137 | |||
136 | $ echo "prepushkey = printenv.py prepushkey 0" >> .hg/hgrc |
|
138 | $ cat >> .hg/hgrc <<EOF | |
|
139 | > prepushkey = sh -c "printenv.py prepushkey 0" | |||
|
140 | > EOF | |||
137 | $ req |
|
141 | $ req | |
138 | pushing to http://localhost:$HGPORT/ |
|
142 | pushing to http://localhost:$HGPORT/ | |
139 | searching for changes |
|
143 | searching for changes |
@@ -38,7 +38,7 b' configure for serving' | |||||
38 | > uncompressed = True |
|
38 | > uncompressed = True | |
39 | > |
|
39 | > | |
40 | > [hooks] |
|
40 | > [hooks] | |
41 |
> changegroup = |
|
41 | > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog" | |
42 | > EOF |
|
42 | > EOF | |
43 | $ cd .. |
|
43 | $ cd .. | |
44 |
|
44 | |||
@@ -114,8 +114,10 b' verify' | |||||
114 | crosschecking files in changesets and manifests |
|
114 | crosschecking files in changesets and manifests | |
115 | checking files |
|
115 | checking files | |
116 | 2 files, 3 changesets, 2 total revisions |
|
116 | 2 files, 3 changesets, 2 total revisions | |
117 |
$ |
|
117 | $ cat >> .hg/hgrc <<EOF | |
118 | $ echo "changegroup = printenv.py changegroup-in-local 0 ../dummylog" >> .hg/hgrc |
|
118 | > [hooks] | |
|
119 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" | |||
|
120 | > EOF | |||
119 |
|
121 | |||
120 | empty default pull |
|
122 | empty default pull | |
121 |
|
123 |
@@ -32,7 +32,7 b' configure for serving' | |||||
32 | > uncompressed = True |
|
32 | > uncompressed = True | |
33 | > |
|
33 | > | |
34 | > [hooks] |
|
34 | > [hooks] | |
35 |
> changegroup = |
|
35 | > changegroup = sh -c "printenv.py changegroup-in-remote 0 ../dummylog" | |
36 | > EOF |
|
36 | > EOF | |
37 | $ cd .. |
|
37 | $ cd .. | |
38 |
|
38 | |||
@@ -108,8 +108,10 b' verify' | |||||
108 | crosschecking files in changesets and manifests |
|
108 | crosschecking files in changesets and manifests | |
109 | checking files |
|
109 | checking files | |
110 | 2 files, 3 changesets, 2 total revisions |
|
110 | 2 files, 3 changesets, 2 total revisions | |
111 |
$ |
|
111 | $ cat >> .hg/hgrc <<EOF | |
112 | $ echo "changegroup = printenv.py changegroup-in-local 0 ../dummylog" >> .hg/hgrc |
|
112 | > [hooks] | |
|
113 | > changegroup = sh -c "printenv.py changegroup-in-local 0 ../dummylog" | |||
|
114 | > EOF | |||
113 |
|
115 | |||
114 | empty default pull |
|
116 | empty default pull | |
115 |
|
117 |
@@ -53,8 +53,10 b' check for HTTP opener failures when cach' | |||||
53 |
|
53 | |||
54 | $ rm .hg/cache/* |
|
54 | $ rm .hg/cache/* | |
55 | $ cd ../local |
|
55 | $ cd ../local | |
56 |
$ |
|
56 | $ cat >> .hg/hgrc <<EOF | |
57 | $ echo "changegroup = printenv.py changegroup" >> .hg/hgrc |
|
57 | > [hooks] | |
|
58 | > changegroup = sh -c "printenv.py changegroup" | |||
|
59 | > EOF | |||
58 | $ hg pull |
|
60 | $ hg pull | |
59 | pulling from static-http://localhost:$HGPORT/remote |
|
61 | pulling from static-http://localhost:$HGPORT/remote | |
60 | searching for changes |
|
62 | searching for changes |
General Comments 0
You need to be logged in to leave comments.
Login now