mercurial-server pretxncommit hook not working

864 views Asked by At

Server

$ hg --version
    Mercurial Distributed SCM (version 2.0.2)

/usr/share/mercurial-server$ cat mercurial_server-1.1.egg-info
    Metadata-Version: 1.1
    Name: mercurial-server
    Version: 1.1

$ cat /etc/mercurial-server/remote-hgrc.d/check.rc 
    [ui]
    debug = true

    [hooks]
    commit.h1 = echo "executing commit USER:$REMOTE_USER"
    precommit.h2 = echo "executing precommit USER:$REMOTE_USER"
    pretxncommit.h3 = echo "executing pretxncommit USER:$REMOTE_USER"
    pretxnchangegroup.h4 = echo "executing pretxnchangegroup USER:$REMOTE_USER"

local machine

unity@unity:~/hgtst/hgadmin$ vi keys/users/user.m/user.m.pub 
unity@unity:~/hgtst/hgadmin$ hg commit -m "Test L"
unity@unity:~/hgtst/hgadmin$ hg push
    pushing to ssh://hg@repo/hgadmin
    searching for changes
    remote: adding changesets
    remote: changesets: 1 chunks
    remote: add changeset 9cb298911d0c
    remote: adding manifests
    remote: manifests: 1/1 chunks (100.00%)
    remote: adding file changes
    remote: adding keys/users/user.m/user.m.pub revisions
    remote: files: 1/1 chunks (100.00%)
    remote: added 1 changesets with 1 changes to 1 files
    remote: calling hook pretxnchangegroup.access: mercurialserver.access.hook
    remote: running hook pretxnchangegroup.h4: echo "executing pretxnchangegroup USER:$REMOTE_USER"
    remote: executing pretxnchangegroup USER:
    remote: updating the branch cache
    remote: calling hook changegroup.aaaaa_servelog: mercurialserver.servelog.hook
    remote: running hook changegroup.aaaab_update: hg update -C default > /dev/null
    remote: running hook changegroup.aaaac_purge: hg purge --all > /dev/null
    remote: calling hook changegroup.refreshauth: mercurialserver.refreshauth.hook
unity@unity:~/hgtst/hgadmin$ 

when I push some changes from local machine to the mercurial-server via ssh pretxnchangegroup hook is executed but no other hook is getting executed.

1

There are 1 answers

0
Tw Bert On

This is to be expected. You don't commit at the remote server, you push changes to it. That's what changegroup is for, which you are using.

To me it seems like everything is working like it should.

Hope this helps, TW