| MAP | TOP > Atelier "FUJIGURUMA" >>>> invocation example of Grapviz extension |
ATTENTION::
Earlier implementation of graphviz command
did not worked correctly,
because I almost focused on graphviz-hook command.
Current implementation is tested well on Mercurial 0.9.3 - 0.9.5.
The easiest way to generate
both image and client side image map files automatically
is using graphviz-hook command.
You can generate them,
which are equivalent to the example shown in this page,
by it with such graphviz section in your hgrc file.
[graphviz]
#### result destination file
imagefile=%%(hgroot)s/.hg/revtree.jpg
#### to group revisions by date
opt.group-by-date=
#### to render date grouping label in 'yyyy-mm-dd' format
opt.cluster-attr-hook=lambda r, b, d: (
d and ('label="%%s-%%s-%%s"' %% (d[:-4], d[-4:-2], d[-2:])))
#### to link Mercurial official repository
opt.urlbase=http://selenic.com/repo/hg
#### to limit target revisions by datetime
opt.datetime=
limitspecs=2007-07-01T00:00:00,2007-07-31T99:99:99
#### to save generated DOT language source
dot_source=
#### to render graph in "bottom to top" direction
dot_opts=-Grankdir=BT
#### to create client side image map file, too
imagemap=
graphviz section configurationgraphviz-hook with above configuration
is almost equivalent to command invocations shown below.
% cd ${HGROOT}
% hg graphviz \
--group-by-date \
--cluster-attr-hook \
"lambda r, b, d: (\
d and ('label=\"%s-%s-%s\"' % (d[:-4], d[-4:-2], d[-2:])))" \
--urlbase http://selenic.com/repo/hg \
--datetime \
2007-07-01T00:00:00,2007-07-31T99:99:99 > .hg/revtree.dot
% dot -T jpg -o .hg/revtree.jpg -Grankdir=BT .hg/revtree.dot
% dot -T cmapx -o .hg/revtree.html -Grankdir=BT .hg/revtree.html
The datetime values
on which "datetime range"/"date grouping" bases on are gotten
from change log in repository,
and converted to local time at invocation environment.
So, (1) selection of target revisions may not correct, and
(2) distributed development crossing multiple timezones may not
fit to group-by-date option.
| MAP | TOP > Atelier "FUJIGURUMA" >>>> invocation example of Grapviz extension |