HG_NODE in changegroup hook
Johannes Stezenbach
js at linuxtv.org
Wed Dec 27 16:39:08 UTC 2006
Hi,
I'm using the diffstat-on-pull hook script described in the Wiki.
http://www.selenic.com/mercurial/wiki/index.cgi/TipsAndTricks#head-dc8f821b7a888755f6157ac98552da6d94d529e3
However, diffstat output disagrees with my expectations. The
diffstat summary line also disagress with "hg pull -u" summary line.
E.g.:
$ hg clone -r 0.9.3 hg hg-foo
requesting all changes
adding changesets
adding manifests
adding file changes
added 3897 changesets with 7480 changes to 567 files
HG_NODE 9117c6561b0bd7792fa13b50d28239d51b78e51f
492 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd hg-foo
$ hg pull -u
pulling from /.../hg
searching for changes
adding changesets
adding manifests
adding file changes
added 61 changesets with 157 changes to 69 files
HG_NODE 1e0b94cfba0e84a62753efd647966c0c1af68450
diffstat for c0a12e6441a5 to 2b87d3c5ab8e
.hgsigs | 1
.hgtags | 1
...
tests/test-push-warn.out | 14 +
84 files changed, 965 insertions(+), 1127 deletions(-)
69 files updated, 0 files merged, 4 files removed, 0 files unresolved
However:
$ cd hg
$ hg diff -r 0.9.3 -r tip | diffstat
...
73 files changed, 781 insertions(+), 1057 deletions(-)
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?
Thanks,
Johannes
More information about the Mercurial
mailing list