##// END OF EJS Templates
bundle2: capture output issue during transaction close...
Pierre-Yves David -
r24850:6b81309d stable
parent child Browse files
Show More
@@ -1298,12 +1298,15 b' def unbundle(repo, cg, heads, source, ur'
1298 tr.hookargs['url'] = url
1298 tr.hookargs['url'] = url
1299 tr.hookargs['bundle2'] = '1'
1299 tr.hookargs['bundle2'] = '1'
1300 r = bundle2.processbundle(repo, cg, lambda: tr).reply
1300 r = bundle2.processbundle(repo, cg, lambda: tr).reply
1301 if r is not None:
1302 repo.ui.pushbuffer(error=True, subproc=True)
1303 def recordout(output):
1304 r.newpart('output', data=output, mandatory=False)
1301 tr.close()
1305 tr.close()
1302 except Exception, exc:
1306 except Exception, exc:
1303 exc.duringunbundle2 = True
1307 exc.duringunbundle2 = True
1304 if r is not None:
1308 if r is not None:
1305 parts = exc._bundle2salvagedoutput = r.salvageoutput()
1309 parts = exc._bundle2salvagedoutput = r.salvageoutput()
1306 repo.ui.pushbuffer(error=True, subproc=True)
1307 def recordout(output):
1310 def recordout(output):
1308 part = bundle2.bundlepart('output', data=output,
1311 part = bundle2.bundlepart('output', data=output,
1309 mandatory=False)
1312 mandatory=False)
@@ -212,20 +212,20 b' push'
212 $ hg -R main push other --rev eea13746799a --bookmark book_eea1
212 $ hg -R main push other --rev eea13746799a --bookmark book_eea1
213 pushing to other
213 pushing to other
214 searching for changes
214 searching for changes
215 pre-close-tip:eea13746799a public book_eea1
216 pushkey: lock state after "phases"
217 lock: free
218 wlock: free
219 pushkey: lock state after "bookmarks"
220 lock: free
221 wlock: free
222 postclose-tip:eea13746799a public book_eea1
223 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)
224 remote: adding changesets
215 remote: adding changesets
225 remote: adding manifests
216 remote: adding manifests
226 remote: adding file changes
217 remote: adding file changes
227 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
218 remote: added 1 changesets with 0 changes to 0 files (-1 heads)
228 remote: 1 new obsolescence markers
219 remote: 1 new obsolescence markers
220 remote: pre-close-tip:eea13746799a public book_eea1
221 remote: pushkey: lock state after "phases"
222 remote: lock: free
223 remote: wlock: free
224 remote: pushkey: lock state after "bookmarks"
225 remote: lock: free
226 remote: wlock: free
227 remote: postclose-tip:eea13746799a public book_eea1
228 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)
229 updating bookmark book_eea1
229 updating bookmark book_eea1
230 pre-close-tip:02de42196ebe draft book_02de
230 pre-close-tip:02de42196ebe draft book_02de
231 postclose-tip:02de42196ebe draft book_02de
231 postclose-tip:02de42196ebe draft book_02de
@@ -304,13 +304,13 b' push over ssh'
304 remote: adding file changes
304 remote: adding file changes
305 remote: added 1 changesets with 1 changes to 1 files
305 remote: added 1 changesets with 1 changes to 1 files
306 remote: 1 new obsolescence markers
306 remote: 1 new obsolescence markers
307 updating bookmark book_5fdd
308 remote: pre-close-tip:5fddd98957c8 draft book_5fdd
307 remote: pre-close-tip:5fddd98957c8 draft book_5fdd
309 remote: pushkey: lock state after "bookmarks"
308 remote: pushkey: lock state after "bookmarks"
310 remote: lock: free
309 remote: lock: free
311 remote: wlock: free
310 remote: wlock: free
312 remote: postclose-tip:5fddd98957c8 draft book_5fdd
311 remote: postclose-tip:5fddd98957c8 draft book_5fdd
313 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)
312 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)
313 updating bookmark book_5fdd
314 pre-close-tip:02de42196ebe draft book_02de
314 pre-close-tip:02de42196ebe draft book_02de
315 postclose-tip:02de42196ebe draft book_02de
315 postclose-tip:02de42196ebe draft book_02de
316 txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob)
316 txnclose hook: HG_SOURCE=push-response HG_TXNID=TXN:* HG_TXNNAME=push-response (glob)
@@ -355,6 +355,15 b' push over http'
355 remote: adding file changes
355 remote: adding file changes
356 remote: added 1 changesets with 1 changes to 1 files
356 remote: added 1 changesets with 1 changes to 1 files
357 remote: 1 new obsolescence markers
357 remote: 1 new obsolescence markers
358 remote: pre-close-tip:32af7686d403 public book_32af
359 remote: pushkey: lock state after "phases"
360 remote: lock: free
361 remote: wlock: free
362 remote: pushkey: lock state after "bookmarks"
363 remote: lock: free
364 remote: wlock: free
365 remote: postclose-tip:32af7686d403 public book_32af
366 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)
358 updating bookmark book_32af
367 updating bookmark book_32af
359 pre-close-tip:02de42196ebe draft book_02de
368 pre-close-tip:02de42196ebe draft book_02de
360 postclose-tip:02de42196ebe draft book_02de
369 postclose-tip:02de42196ebe draft book_02de
@@ -548,7 +557,7 b' Doing the actual push: hook abort'
548 > [failpush]
557 > [failpush]
549 > reason =
558 > reason =
550 > [hooks]
559 > [hooks]
551 > pretxnclose.failpush = false
560 > pretxnclose.failpush = echo "You shall not pass!"; false
552 > txnabort.failpush = echo 'Cleaning up the mess...'
561 > txnabort.failpush = echo 'Cleaning up the mess...'
553 > EOF
562 > EOF
554
563
@@ -559,11 +568,12 b' Doing the actual push: hook abort'
559 $ hg -R main push other -r e7ec4e813ba6
568 $ hg -R main push other -r e7ec4e813ba6
560 pushing to other
569 pushing to other
561 searching for changes
570 searching for changes
562 pre-close-tip:e7ec4e813ba6 draft
563 remote: adding changesets
571 remote: adding changesets
564 remote: adding manifests
572 remote: adding manifests
565 remote: adding file changes
573 remote: adding file changes
566 remote: added 1 changesets with 1 changes to 1 files
574 remote: added 1 changesets with 1 changes to 1 files
575 remote: pre-close-tip:e7ec4e813ba6 draft
576 remote: You shall not pass!
567 remote: transaction abort!
577 remote: transaction abort!
568 remote: Cleaning up the mess...
578 remote: Cleaning up the mess...
569 remote: rollback completed
579 remote: rollback completed
@@ -577,11 +587,12 b' Doing the actual push: hook abort'
577 remote: adding manifests
587 remote: adding manifests
578 remote: adding file changes
588 remote: adding file changes
579 remote: added 1 changesets with 1 changes to 1 files
589 remote: added 1 changesets with 1 changes to 1 files
590 remote: pre-close-tip:e7ec4e813ba6 draft
591 remote: You shall not pass!
580 remote: transaction abort!
592 remote: transaction abort!
581 remote: Cleaning up the mess...
593 remote: Cleaning up the mess...
582 remote: rollback completed
594 remote: rollback completed
583 abort: pretxnclose.failpush hook exited with status 1
595 abort: pretxnclose.failpush hook exited with status 1
584 remote: pre-close-tip:e7ec4e813ba6 draft
585 [255]
596 [255]
586
597
587 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
598 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
@@ -591,6 +602,8 b' Doing the actual push: hook abort'
591 remote: adding manifests
602 remote: adding manifests
592 remote: adding file changes
603 remote: adding file changes
593 remote: added 1 changesets with 1 changes to 1 files
604 remote: added 1 changesets with 1 changes to 1 files
605 remote: pre-close-tip:e7ec4e813ba6 draft
606 remote: You shall not pass!
594 remote: transaction abort!
607 remote: transaction abort!
595 remote: Cleaning up the mess...
608 remote: Cleaning up the mess...
596 remote: rollback completed
609 remote: rollback completed
General Comments 0
You need to be logged in to leave comments. Login now