comparison tests/test-bundle2-exchange.t @ 27739:d6d3cf5fda6f

hooks: add HG_NODE_LAST to txnclose and changegroup hook environments Sometimes a txnclose or changegroup hook wants to iterate through all the changesets in transaction: in that situation usually the revset `$HG_NODE:` is used to select the revisions. Unfortunately this revset sometimes may contain too many changesets because we don't have the write lock while the hook runs newer changes may be added to repository in the meantime. That's why there is a need for extra variable carrying the information about the last change in the transaction.
author Mateusz Kwapich <mitrandir@fb.com>
date Tue, 05 Jan 2016 17:37:59 -0800
parents 37d7cf569cf3
children e01bd7385f4f
comparison
equal deleted inserted replaced
27738:a0e783d26e81 27739:d6d3cf5fda6f
49 adding manifests 49 adding manifests
50 adding file changes 50 adding file changes
51 added 8 changesets with 7 changes to 7 files (+3 heads) 51 added 8 changesets with 7 changes to 7 files (+3 heads)
52 pre-close-tip:02de42196ebe draft 52 pre-close-tip:02de42196ebe draft
53 postclose-tip:02de42196ebe draft 53 postclose-tip:02de42196ebe draft
54 txnclose hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:* HG_TXNNAME=unbundle (glob) 54 txnclose hook: HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:* HG_TXNNAME=unbundle (glob)
55 bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob) 55 bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob)
56 (run 'hg heads' to see heads, 'hg merge' to merge) 56 (run 'hg heads' to see heads, 'hg merge' to merge)
57 57
58 $ cd .. 58 $ cd ..
59 59
83 adding file changes 83 adding file changes
84 added 2 changesets with 2 changes to 2 files 84 added 2 changesets with 2 changes to 2 files
85 1 new obsolescence markers 85 1 new obsolescence markers
86 pre-close-tip:9520eea781bc draft 86 pre-close-tip:9520eea781bc draft
87 postclose-tip:9520eea781bc draft 87 postclose-tip:9520eea781bc draft
88 txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) 88 txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=9520eea781bcca16c1e15acc0ba14335a0e8e5ba HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob)
89 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) 89 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
90 updating to branch default 90 updating to branch default
91 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 91 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
92 $ hg -R other log -G 92 $ hg -R other log -G
93 @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E 93 @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
111 adding file changes 111 adding file changes
112 added 1 changesets with 1 changes to 1 files (+1 heads) 112 added 1 changesets with 1 changes to 1 files (+1 heads)
113 1 new obsolescence markers 113 1 new obsolescence markers
114 pre-close-tip:24b6387c8c8c draft 114 pre-close-tip:24b6387c8c8c draft
115 postclose-tip:24b6387c8c8c draft 115 postclose-tip:24b6387c8c8c draft
116 txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) 116 txnclose hook: HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_NODE_LAST=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob)
117 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob) 117 file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
118 (run 'hg heads' to see heads, 'hg merge' to merge) 118 (run 'hg heads' to see heads, 'hg merge' to merge)
119 $ hg -R other log -G 119 $ hg -R other log -G
120 o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F 120 o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
121 | 121 |
255 remote: wlock: free 255 remote: wlock: free
256 remote: pushkey: lock state after "bookmarks" 256 remote: pushkey: lock state after "bookmarks"
257 remote: lock: free 257 remote: lock: free
258 remote: wlock: free 258 remote: wlock: free
259 remote: postclose-tip:eea13746799a public book_eea1 259 remote: postclose-tip:eea13746799a public book_eea1
260 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob) 260 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_NODE_LAST=eea13746799a9e0bfd88f29d3c2e9dc9389f524f HG_PHASES_MOVED=1 HG_SOURCE=push HG_TXNID=TXN:* HG_TXNNAME=push HG_URL=push (glob)
261 updating bookmark book_eea1 261 updating bookmark book_eea1
262 pre-close-tip:02de42196ebe draft book_02de 262 pre-close-tip:02de42196ebe draft book_02de
263 postclose-tip:02de42196ebe draft book_02de 263 postclose-tip:02de42196ebe draft book_02de
264 txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) 264 txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob)
265 file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob) 265 file:/*/$TESTTMP/other HG_URL=file:$TESTTMP/other (glob)
288 added 1 changesets with 1 changes to 1 files (+1 heads) 288 added 1 changesets with 1 changes to 1 files (+1 heads)
289 1 new obsolescence markers 289 1 new obsolescence markers
290 updating bookmark book_02de 290 updating bookmark book_02de
291 pre-close-tip:02de42196ebe draft book_02de 291 pre-close-tip:02de42196ebe draft book_02de
292 postclose-tip:02de42196ebe draft book_02de 292 postclose-tip:02de42196ebe draft book_02de
293 txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) 293 txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob)
294 ssh://user@dummy/main HG_URL=ssh://user@dummy/main 294 ssh://user@dummy/main HG_URL=ssh://user@dummy/main
295 (run 'hg heads' to see heads, 'hg merge' to merge) 295 (run 'hg heads' to see heads, 'hg merge' to merge)
296 $ hg -R other debugobsolete 296 $ hg -R other debugobsolete
297 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 297 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
298 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 298 2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
313 added 1 changesets with 1 changes to 1 files (+1 heads) 313 added 1 changesets with 1 changes to 1 files (+1 heads)
314 1 new obsolescence markers 314 1 new obsolescence markers
315 updating bookmark book_42cc 315 updating bookmark book_42cc
316 pre-close-tip:42ccdea3bb16 draft book_42cc 316 pre-close-tip:42ccdea3bb16 draft book_42cc
317 postclose-tip:42ccdea3bb16 draft book_42cc 317 postclose-tip:42ccdea3bb16 draft book_42cc
318 txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob) 318 txnclose hook: HG_BOOKMARK_MOVED=1 HG_NEW_OBSMARKERS=1 HG_NODE=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_NODE_LAST=42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:* HG_TXNNAME=pull (glob)
319 http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/ 319 http://localhost:$HGPORT/ HG_URL=http://localhost:$HGPORT/
320 (run 'hg heads .' to see heads, 'hg merge' to merge) 320 (run 'hg heads .' to see heads, 'hg merge' to merge)
321 $ cat main-error.log 321 $ cat main-error.log
322 $ hg -R other debugobsolete 322 $ hg -R other debugobsolete
323 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 323 1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
339 remote: pre-close-tip:5fddd98957c8 draft book_5fdd 339 remote: pre-close-tip:5fddd98957c8 draft book_5fdd
340 remote: pushkey: lock state after "bookmarks" 340 remote: pushkey: lock state after "bookmarks"
341 remote: lock: free 341 remote: lock: free
342 remote: wlock: free 342 remote: wlock: free
343 remote: postclose-tip:5fddd98957c8 draft book_5fdd 343 remote: postclose-tip:5fddd98957c8 draft book_5fdd
344 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:* HG_TXNNAME=serve HG_URL=remote:ssh:127.0.0.1 (glob) 344 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_NODE_LAST=5fddd98957c8a54a4d436dfe1da9d87f21a1b97b HG_SOURCE=serve HG_TXNID=TXN:* HG_TXNNAME=serve HG_URL=remote:ssh:127.0.0.1 (glob)
345 updating bookmark book_5fdd 345 updating bookmark book_5fdd
346 pre-close-tip:02de42196ebe draft book_02de 346 pre-close-tip:02de42196ebe draft book_02de
347 postclose-tip:02de42196ebe draft book_02de 347 postclose-tip:02de42196ebe draft book_02de
348 txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) 348 txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob)
349 ssh://user@dummy/other HG_URL=ssh://user@dummy/other 349 ssh://user@dummy/other HG_URL=ssh://user@dummy/other
393 remote: wlock: free 393 remote: wlock: free
394 remote: pushkey: lock state after "bookmarks" 394 remote: pushkey: lock state after "bookmarks"
395 remote: lock: free 395 remote: lock: free
396 remote: wlock: free 396 remote: wlock: free
397 remote: postclose-tip:32af7686d403 public book_32af 397 remote: postclose-tip:32af7686d403 public book_32af
398 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:* HG_TXNNAME=serve HG_URL=remote:http:127.0.0.1: (glob) 398 remote: txnclose hook: HG_BOOKMARK_MOVED=1 HG_BUNDLE2=1 HG_NEW_OBSMARKERS=1 HG_NODE=32af7686d403cf45b5d95f2d70cebea587ac806a HG_NODE_LAST=32af7686d403cf45b5d95f2d70cebea587ac806a HG_PHASES_MOVED=1 HG_SOURCE=serve HG_TXNID=TXN:* HG_TXNNAME=serve HG_URL=remote:http:127.0.0.1: (glob)
399 updating bookmark book_32af 399 updating bookmark book_32af
400 pre-close-tip:02de42196ebe draft book_02de 400 pre-close-tip:02de42196ebe draft book_02de
401 postclose-tip:02de42196ebe draft book_02de 401 postclose-tip:02de42196ebe draft book_02de
402 txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob) 402 txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob)
403 http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/ 403 http://localhost:$HGPORT2/ HG_URL=http://localhost:$HGPORT2/