Comments
Patch
@@ -720,13 +720,10 @@ def addchangegroup(repo, source, srctype
# publishing only alter behavior during push
#
# strip should not touch boundary at all
phases.retractboundary(repo, tr, targetphase, added)
-
- tr.close()
-
if changesets > 0:
if srctype != 'strip':
# During strip, branchcache is invalid but coming call to
# `destroyed` will repair it.
# In other case we can safely update cache on disk.
@@ -751,11 +748,15 @@ def addchangegroup(repo, source, srctype
newheads = [h for h in repo.heads() if h not in oldheads]
repo.ui.log("incoming",
"%s incoming changes - new heads: %s\n",
len(added),
', '.join([hex(c[:6]) for c in newheads]))
- repo._afterlock(runhooks)
+
+ tr.addpostclose('changegroup-runhooks-%020i' % clstart,
+ lambda: repo._afterlock(runhooks))
+
+ tr.close()
finally:
tr.release()
# never return 0 here:
if dh < 0:
@@ -460,21 +460,19 @@ Doing the actual push: hook abort
$ hg -R main push other -r e7ec4e813ba6
pushing to other
searching for changes
transaction abort!
rollback completed
- changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=e7ec4e813ba6b07be2a0516ce1a74bb4e503f91a HG_SOURCE=push HG_URL=push
abort: b2x-pretransactionclose.failpush hook exited with status 1
[255]
$ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
pushing to ssh://user@dummy/other
searching for changes
abort: b2x-pretransactionclose.failpush hook exited with status 1
remote: transaction abort!
remote: rollback completed
- remote: changegroup hook: HG_BUNDLE2-EXP=1 HG_NODE=e7ec4e813ba6b07be2a0516ce1a74bb4e503f91a HG_SOURCE=serve HG_URL=remote:ssh:127.0.0.1
[255]
$ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
pushing to http://localhost:$HGPORT2/
searching for changes