`pretxnchangegroup` not run when pulling from git repos
pretxnchangegroup
hook is never invoked when pulling from Git repos. For example, with this hgrc
:
[paths]
default = git@github.com:mathrick/godot-external-files.git
test = https://foss.heptapod.net/mercurial/config-express
[extensions]
hggit =
[hooks]
changegroup = python:hook/myhook.py:test_hook
pretxnchangegroup.py = python:hook/myhook.py:test_hook
and the following hook/myhook.py
:
def test_hook(ui, repo, hooktype, *args, **kwargs):
ui.write(b"my python hook! %s\n" % (hooktype))
Pulling from github:
$ hg pull
pulling from git@github.com:mathrick/godot-external-files.git
importing 7 git commits
adding bookmark main
my python hook! changegroup
new changesets 79361ea44eb2:76059deb19b2 (7 drafts)
(run 'hg heads' to see heads, 'hg merge' to merge)
For comparison, here's a pull from a native mercurial repo:
$ hg pull test -f
pulling from https://foss.heptapod.net/mercurial/config-express
searching for changes
warning: repository is unrelated
requesting all changes
adding changesets
adding manifests
adding file changes
my python hook! pretxnchangegroup
added 189 changesets with 274 changes to 22 files (+1 heads)
869 new obsolescence markers
new changesets 3a54dce92132:ad03ca0dd848
(run 'hg heads' to see heads, 'hg merge' to merge)
my python hook! changegroup
#315 (closed) has previously reported a similar issue (apparently also present when pushing), but there was never any response.