HG_NODE in changegroup hook

Johannes Stezenbach js at linuxtv.org
Wed Dec 27 19:24:34 UTC 2006


On Wed, Dec 27, 2006 at 06:00:05PM +0100, Benoit Boissinot wrote:
> On 12/27/06, Johannes Stezenbach <js at linuxtv.org> wrote:
> >
> >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]

OK, so I updated the Wiki.


Thanks,
Johannes



More information about the Mercurial mailing list