/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to graph.py

  • Committer: David Allouche
  • Date: 2005-12-03 04:03:24 UTC
  • Revision ID: david.allouche@canonical.com-20051203040324-c8e214d22f6ca708
make expensive sorting and parent filtering optional

Show diffs side-by-side

added added

removed removed

Lines of Context:
263
263
                self.colours[revid] = self.last_colour = self.last_colour + 1
264
264
 
265
265
 
266
 
def distances(branch, start):
 
266
def distances(branch, start, robust, accurate):
267
267
    """Sort the revisions.
268
268
 
269
269
    Traverses the branch revision tree starting at start and produces an
275
275
    distance = DistanceMethod(branch, start)
276
276
    distance.fill_caches()
277
277
    sorted_revids = distance.first_ancestry_traversal()
278
 
    distance.remove_redundant_parents(sorted_revids)
 
278
    if robust:
 
279
        print 'robust filtering'
 
280
        distance.remove_redundant_parents(sorted_revids)
279
281
    children = distance.make_children_map()
280
 
    sorted_revids = distance.sort_revisions(sorted_revids)
 
282
    if accurate:
 
283
        print 'accurate sorting'
 
284
        sorted_revids = distance.sort_revisions(sorted_revids)
281
285
    for revid in sorted_revids:
282
286
        distance.choose_colour(revid)
283
287