Show More
@@ -1,6 +1,13 b'' | |||||
1 | commit hooks can see env vars |
|
1 | commit hooks can see env vars | |
2 | (and post-transaction one are run unlocked) |
|
2 | (and post-transaction one are run unlocked) | |
3 |
|
3 | |||
|
4 | $ cat << EOF >> $HGRCPATH | |||
|
5 | > [experimental] | |||
|
6 | > # drop me once bundle2 is the default, | |||
|
7 | > # added to get test change early. | |||
|
8 | > bundle2-exp = True | |||
|
9 | > EOF | |||
|
10 | ||||
4 |
$ |
|
11 | $ cat > $TESTTMP/txnabort.checkargs.py <<EOF | |
5 | > def showargs(ui, repo, hooktype, **kwargs): |
|
12 | > def showargs(ui, repo, hooktype, **kwargs): | |
6 | > ui.write('%s python hook: %s\n' % (hooktype, ','.join(sorted(kwargs)))) |
|
13 | > ui.write('%s python hook: %s\n' % (hooktype, ','.join(sorted(kwargs)))) | |
@@ -228,10 +235,10 b' pushkey hook' | |||||
228 | pushing to ../a |
|
235 | pushing to ../a | |
229 | searching for changes |
|
236 | searching for changes | |
230 | no changes found |
|
237 | no changes found | |
231 |
pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME= |
|
238 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=push (glob) | |
232 |
pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_PENDING=$TESTTMP/a HG_TXNID=TXN:* HG_TXNNAME= |
|
239 | pretxnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_PENDING=$TESTTMP/a HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) | |
233 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_TXNID=TXN:* HG_TXNNAME=bookmarks (glob) |
|
|||
234 | pushkey hook: HG_KEY=foo HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_RET=1 |
|
240 | pushkey hook: HG_KEY=foo HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_RET=1 | |
|
241 | txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) | |||
235 | exporting bookmark foo |
|
242 | exporting bookmark foo | |
236 | [1] |
|
243 | [1] | |
237 | $ cd ../a |
|
244 | $ cd ../a | |
@@ -244,10 +251,11 b' listkeys hook' | |||||
244 | $ hg pull -B bar ../a |
|
251 | $ hg pull -B bar ../a | |
245 | pulling from ../a |
|
252 | pulling from ../a | |
246 | listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} |
|
253 | listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} | |
|
254 | no changes found | |||
|
255 | listkeys hook: HG_NAMESPACE=phase HG_VALUES={} | |||
247 | listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} |
|
256 | listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} | |
248 | no changes found |
|
257 | adding remote bookmark bar | |
249 | listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} |
|
258 | listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} | |
250 | adding remote bookmark bar |
|
|||
251 | $ cd ../a |
|
259 | $ cd ../a | |
252 |
|
260 | |||
253 | test that prepushkey can prevent incoming keys |
|
261 | test that prepushkey can prevent incoming keys | |
@@ -261,10 +269,13 b' test that prepushkey can prevent incomin' | |||||
261 | listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} |
|
269 | listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} | |
262 | listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} |
|
270 | listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} | |
263 | no changes found |
|
271 | no changes found | |
|
272 | pretxnopen hook: HG_TXNID=TXN:* HG_TXNNAME=push (glob) | |||
|
273 | prepushkey.forbid hook: HG_BUNDLE2=1 HG_KEY=baz HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 HG_SOURCE=push HG_TXNID=TXN:* HG_URL=push (glob) | |||
|
274 | pushkey-abort: prepushkey hook exited with status 1 | |||
|
275 | pretxnclose hook: HG_BUNDLE2=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) | |||
|
276 | txnclose hook: HG_BUNDLE2=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) | |||
|
277 | exporting bookmark baz failed! | |||
264 | listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} |
|
278 | listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} | |
265 | prepushkey.forbid hook: HG_KEY=baz HG_NAMESPACE=bookmarks HG_NEW=0000000000000000000000000000000000000000 |
|
|||
266 | pushkey-abort: prepushkey hook exited with status 1 |
|
|||
267 | exporting bookmark baz failed! |
|
|||
268 | [1] |
|
279 | [1] | |
269 | $ cd ../a |
|
280 | $ cd ../a | |
270 |
|
281 | |||
@@ -333,8 +344,8 b' outgoing hooks can see env vars' | |||||
333 | pulling from ../a |
|
344 | pulling from ../a | |
334 | searching for changes |
|
345 | searching for changes | |
335 | preoutgoing hook: HG_SOURCE=pull |
|
346 | preoutgoing hook: HG_SOURCE=pull | |
|
347 | outgoing hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_SOURCE=pull | |||
336 | adding changesets |
|
348 | adding changesets | |
337 | outgoing hook: HG_NODE=539e4b31b6dc99b3cfbaa6b53cbc1c1f9a1e3a10 HG_SOURCE=pull |
|
|||
338 | adding manifests |
|
349 | adding manifests | |
339 | adding file changes |
|
350 | adding file changes | |
340 | added 1 changesets with 1 changes to 1 files |
|
351 | added 1 changesets with 1 changes to 1 files |
General Comments 0
You need to be logged in to leave comments.
Login now