##// END OF EJS Templates
changegroup: use the 'postclose' API on transaction...
Pierre-Yves David -
r23221:cadc9a72 default
parent child Browse files
Show More
@@ -788,9 +788,6 b' def addchangegroup(repo, source, srctype'
788 # strip should not touch boundary at all
788 # strip should not touch boundary at all
789 phases.retractboundary(repo, tr, targetphase, added)
789 phases.retractboundary(repo, tr, targetphase, added)
790
790
791
792 tr.close()
793
794 if changesets > 0:
791 if changesets > 0:
795 if srctype != 'strip':
792 if srctype != 'strip':
796 # During strip, branchcache is invalid but coming call to
793 # During strip, branchcache is invalid but coming call to
@@ -819,7 +816,11 b' def addchangegroup(repo, source, srctype'
819 "%s incoming changes - new heads: %s\n",
816 "%s incoming changes - new heads: %s\n",
820 len(added),
817 len(added),
821 ', '.join([hex(c[:6]) for c in newheads]))
818 ', '.join([hex(c[:6]) for c in newheads]))
822 repo._afterlock(runhooks)
819
820 tr.addpostclose('changegroup-runhooks-%020i' % clstart,
821 lambda: repo._afterlock(runhooks))
822
823 tr.close()
823
824
824 finally:
825 finally:
825 tr.release()
826 tr.release()
@@ -462,7 +462,6 b' Doing the actual push: hook abort'
462 searching for changes
462 searching for changes
463 transaction abort!
463 transaction abort!
464 rollback completed
464 rollback completed
465 changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=e7ec4e813ba6b07be2a0516ce1a74bb4e503f91a HG_SOURCE=push HG_URL=push
466 abort: b2x-pretransactionclose.failpush hook exited with status 1
465 abort: b2x-pretransactionclose.failpush hook exited with status 1
467 [255]
466 [255]
468
467
@@ -472,7 +471,6 b' Doing the actual push: hook abort'
472 abort: b2x-pretransactionclose.failpush hook exited with status 1
471 abort: b2x-pretransactionclose.failpush hook exited with status 1
473 remote: transaction abort!
472 remote: transaction abort!
474 remote: rollback completed
473 remote: rollback completed
475 remote: changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=e7ec4e813ba6b07be2a0516ce1a74bb4e503f91a HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
476 [255]
474 [255]
477
475
478 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
476 $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
General Comments 0
You need to be logged in to leave comments. Login now