Size: 828
Comment: converted to 1.6 markup
|
Size: 1884
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
= Drawing Graphs = How to add graphs to this wiki. <<TableOfContents>> == Drawing revision graphs == |
|
Line 27: | Line 35: |
See UnderstandingMercurial, ConcatenatingChangesets, and [[http://www.graphviz.org/Gallery.php|"Graphviz Gallery"]] for examples. | == Drawing flowcharts == |
Line 29: | Line 37: |
See http://www.graphviz.org/doc/info/attrs.html for additional attributes. | To draw a flowchart like this: {{{#!dot digraph G { {node[shape=box] push pull merge} {node[shape=diamond] succeed} push [label="try to push"] succeed [label="did push succeed?"] pull [label="pull unsynced changes"] merge [label="merge"] start -> push -> succeed pull -> merge -> push:n succeed:e -> pull [label=n] succeed:s -> done [label=y] } }}} Use: {{{ { { {#!dot digraph G { {node[shape=box] push pull merge} {node[shape=diamond] succeed} push [label="try to push"] succeed [label="did push succeed?"] pull [label="pull unsynced changes"] merge [label="merge"] start -> push -> succeed pull -> merge -> push:n succeed:e -> pull [label=n] succeed:s -> done [label=y] } } } } }}} Note the use of compass points to control edge start and end points. == See also == * [[http://www.graphviz.org/doc/info/attrs.html|Graphviz documentation]] for additional attributes * UnderstandingMercurial and ConcatenatingChangesets for examples on this wiki * [[http://www.graphviz.org/Gallery.php|"Graphviz Gallery"]] for more examples |
Line 32: | Line 86: |
CategoryHowTo | CategoryWiki |
Drawing Graphs
How to add graphs to this wiki.
Drawing revision graphs
The Mercurial wiki allows easily adding graph diagrams to pages. To draw a graph like this:
add a section like this:
{ { {#!dot digraph G { rankdir=LR node [shape=box] a -> b -> c -> d -> e d->f } } } }
For consistency, use [shape=box] for Mercurial revisions, [shape=ellipse] for the working directory, and rankdir=LR (left-to-right) or rankdir=BT (bottom-to-top) for revision graphs.
Drawing flowcharts
To draw a flowchart like this:
Use:
{ { {#!dot digraph G { {node[shape=box] push pull merge} {node[shape=diamond] succeed} push [label="try to push"] succeed [label="did push succeed?"] pull [label="pull unsynced changes"] merge [label="merge"] start -> push -> succeed pull -> merge -> push:n succeed:e -> pull [label=n] succeed:s -> done [label=y] } } } }
Note the use of compass points to control edge start and end points.
See also
Graphviz documentation for additional attributes
UnderstandingMercurial and ConcatenatingChangesets for examples on this wiki
"Graphviz Gallery" for more examples