# dagmatic

dagmatic is a tool to parse a custom ASCII-art representation of Mercurial repositories and render them in a variety of forms (none implemented yet, but SVG is the primary goal).

The input language looks like this:

a-b-c
\
d-e


meaning:

• a is the parent of b
• b is the parent of c and d
• d is the parent of e

History goes left-to-right and top-to-bottom. Currently, there are a few ways to express a parent-child relationship: horizontal (-), vertical (|) lower diagonal (\), upper diagonal (/). This might change in future.

dagmatic also lets you express changeset obsolescence (ie. precursor/successor relationships):

a-b-c
\: :
d-e


Here, d is the successor of b and e is the successor of c. You can also specify diagonal markers:

a-b-c
\:>
d


Now, d is the successor of both b and c. The current ways to express a precursor-successor relationship are: horizontal (.), vertical (:), lower diagonal (<) and upper diagonal (>) (think of just the lower part of the angle bracket). This might change in the future.

dagmatic will also let you describe a series of DAGs using a transition marker:

a-b

|| hg commit

a-b-c


## Usage

Too early to document. See the source code.

## TODO

• use visitor pattern insteatd of tikz() method
• use state pattern for parsing

## Credits, contacts

Written by Greg Ward and Sean Farley, based on an idea by Matt Mackall.

The canonical source repository is

https://bitbucket.org/gward/dagmatic

with mirrors:

http://hg.gerg.ca/dagmatic