HG_NODE in changegroup hook

Benoit Boissinot bboissin at gmail.com
Wed Dec 27 11:00:05 CST 2006


On 12/27/06, Johannes Stezenbach <js at linuxtv.org> wrote:
> Hi,
>
> I'm using the diffstat-on-pull hook script described in the Wiki.
> > Should the diffstat hook script use something like
>
>   REV=`hg log -r $HG_NODE --template '{rev}'`
>   PARENT=`expr $REV - 1`
>
> instead of
>
>   PARENT=`hg parents --template '{node|short}' -r $HG_NODE | head -1`
>
> or is something else broken?
>
Your right the old tip is rev(HG_NODE) -1, and not necessarly
parents(HG_NODE)[0]

regards,

Benoit


More information about the Mercurial mailing list