~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to dotgraph.py

  • Committer: Aaron Bentley
  • Date: 2005-08-31 17:47:10 UTC
  • Revision ID: abentley@panoramicfeedback.com-20050831174710-ba3546525fd97724
support multiple image formats for graph-ancestry

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        yield "    %s->%s;\n" % (start.name, end.name)
44
44
    yield "}\n"
45
45
 
46
 
def invoke_dot(input, out_file=None):
47
 
    cmdline = ['dot', '-Tsvg']
 
46
def invoke_dot(input, out_file=None, file_type='svg'):
 
47
    cmdline = ['dot', '-T%s' % file_type]
48
48
    if out_file is not None:
49
49
        cmdline.extend(('-o', out_file))
50
50
    dot_proc = Popen(cmdline, stdin=PIPE)