~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2005-08-30 16:33:39 UTC
  • Revision ID: abentley@panoramicfeedback.com-20050830163339-0ced18607bbaf642
Got initial graphing functionality working

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
        import clean_tree
28
28
        clean_tree.clean_tree(ignored=ignored)
29
29
 
 
30
class cmd_graph_ancestry(bzrlib.commands.Command):
 
31
    takes_args = ['branch']
 
32
    def run(self, branch):
 
33
        import graph
 
34
        from dotgraph import dot_output, invoke_dot
 
35
        from bzrlib.branch import Branch
 
36
        b = Branch(branch)
 
37
        relations = graph.graph_ancestry(b)
 
38
        invoke_dot(dot_output(relations), 'graphtest.svg')
 
39
 
30
40
commands = [push.cmd_push, annotate.cmd_annotate, shelf.cmd_shelve, 
31
41
            shelf.cmd_unshelve, cmd_clean_tree, conflicts.cmd_conflicts,
32
 
            conflicts.cmd_resolve]
 
42
            conflicts.cmd_resolve, cmd_graph_ancestry]
33
43
from errors import NoPyBaz
34
44
try:
35
45
    import baz_import