~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2005-08-31 18:41:38 UTC
  • Revision ID: abentley@panoramicfeedback.com-20050831184138-b918af6846adb1e7
Allowed disabling ancestry collapsing

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
        import clean_tree
31
31
        clean_tree.clean_tree(ignored=ignored)
32
32
 
 
33
bzrlib.commands.OPTIONS['no-collapse'] = None
 
34
 
33
35
class cmd_graph_ancestry(bzrlib.commands.Command):
 
36
    """Produce ancestry graphs using dot.
 
37
    
 
38
    Output format is detected according to file extension.  Some of the more
 
39
    common outputs are png, gif, svg, ps.  An extension of '.dot' will cause
 
40
    a dot input file to be produced.
 
41
 
 
42
    Ancestry is usually collapsed by removing nodes with a single parent
 
43
    and descendant, but this can be disabled with --no-collapse.
 
44
    """
34
45
    takes_args = ['branch', 'file']
35
 
    def run(self, branch, file):
 
46
    takes_options = ['no-collapse']
 
47
    def run(self, branch, file, no_collapse=False):
36
48
        import graph
37
 
        graph.write_ancestry_file(branch, file)
 
49
        graph.write_ancestry_file(branch, file, not no_collapse)
38
50
 
39
51
commands = [push.cmd_push, annotate.cmd_annotate, shelf.cmd_shelve, 
40
52
            shelf.cmd_unshelve, cmd_clean_tree, conflicts.cmd_conflicts,