~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2006-12-22 18:31:21 UTC
  • mto: (481.1.1 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 485.
  • Revision ID: abentley@panoramicfeedback.com-20061222183121-fvvrasz8s2w6nbis
graph-ancestry can restrict the number of nodes shown by distance

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
                     help="Do not use rsvg to produce antialiased output"), 
155
155
                     Option('merge-branch', type=str, 
156
156
                     help="Use this branch to calcuate a merge base"), 
157
 
                     Option('cluster', help="Use clustered output.")]
 
157
                     Option('cluster', help="Use clustered output."),
 
158
                     Option('max-distance', help="Show no nodes farther than this",
 
159
                            type=int)]
158
160
    def run(self, branch, file, no_collapse=False, no_antialias=False,
159
 
        merge_branch=None, cluster=False):
 
161
        merge_branch=None, cluster=False, max_distance=None):
160
162
        import graph
161
163
        if cluster:
162
164
            ranking = "cluster"
163
165
        else:
164
166
            ranking = "forced"
165
167
        graph.write_ancestry_file(branch, file, not no_collapse, 
166
 
                                  not no_antialias, merge_branch, ranking)
 
168
                                  not no_antialias, merge_branch, ranking, 
 
169
                                  max_distance=max_distance)
167
170
 
168
171
 
169
172
class cmd_fetch_ghosts(bzrlib.commands.Command):