Mercurial hook not executing properly

后端 未结 9 1423
北恋
北恋 2020-12-30 12:02

This should be a very simple thing to have run, but for some reason it won\'t work with my Mercurial repository. All I want is for the remote repo to automatically run

9条回答
  •  难免孤独
    2020-12-30 12:37

    took a while but I got it working.

    I started with

    [hooks]
    tag=set >&2
    commit=set >&2
    

    the >&2 pipes it to standard error so remote consoles will show it.

    when remote this should output in console if it is running

    hg push https://host/hg   -v
    

    It wasn't.

    I was using hgweb.cgi so I switched to hgweb.wsgi with no difference.

    what I discovered is that some hooks don't get called on remote.

    when I switched it to

    [hooks]
    incoming= set >&2
    

    the hooks tag and commit don't seem to get called but incoming and changeset do get called. I haven't confirmed the others.

    now that I got it working I switched back to hgweb.cgi and everything works the same.

提交回复
热议问题