mercurial/localrepo.py
changeset 34711 f6d17075608f
parent 34710 cdf833d7de98
child 34824 e2ad93bcc084
--- a/mercurial/localrepo.py	Sun Oct 08 17:50:46 2017 +0200
+++ b/mercurial/localrepo.py	Sun Oct 08 17:23:18 2017 +0200
@@ -1243,6 +1243,14 @@
                     repo.hook('pretxnclose-bookmark', throw=True,
                               txnname=desc,
                               **pycompat.strkwargs(args))
+            if hook.hashook(repo.ui, 'pretxnclose-phase'):
+                cl = repo.unfiltered().changelog
+                for rev, (old, new) in tr.changes['phases'].items():
+                    args = tr.hookargs.copy()
+                    node = hex(cl.node(rev))
+                    args.update(phases.preparehookargs(node, old, new))
+                    repo.hook('pretxnclose-phase', throw=True, txnname=desc,
+                              **pycompat.strkwargs(args))
 
             repo.hook('pretxnclose', throw=True,
                       txnname=desc, **pycompat.strkwargs(tr.hookargs))