Search code examples
mercurialhookmercurial-hook

Mercurial external precommit hook: get changed files list


I could get it either with

hg status --change $HG_NODE

or with

hg log -r $HG_NODE --style mycustomstyle

But I can't get HG_NODE in precommit hook. Is there any workaround?


Solution

  • If

    hg status --change $HG_NODE
    

    is what you want, I guess you could just use:

    hg status