~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to graph.py

  • Committer: Aaron Bentley
  • Date: 2005-09-01 16:06:54 UTC
  • Revision ID: abentley@panoramicfeedback.com-20050901160654-fd146b4530a92ee4
Clustered the branch revision history

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
from bzrlib.errors import BzrCommandError
4
4
import bzrlib.errors
5
5
import re
 
6
import os.path
6
7
 
7
8
mail_map.update({'aaron.bentley@utoronto.ca'     : 'Aaron Bentley',
8
9
                 'abentley@panoramicfeedback.com': 'Aaron Bentley',
57
58
    nodes = {}
58
59
    q = ((i+1, n) for (i, n) in enumerate(branch.revision_history()))
59
60
    r = 1
 
61
    try:
 
62
        branch_name = os.path.basename(branch.base)
 
63
    except AttributeError:
 
64
        branch_name = "main"
60
65
    for (revno, rev_id) in q:
61
 
        nodes[rev_id] = Node("R%d" % revno, color="#ffff00", rev_id=rev_id)
 
66
        nodes[rev_id] = Node("R%d" % revno, color="#ffff00", rev_id=rev_id, 
 
67
                             cluster=branch_name)
62
68
 
63
69
    ancestors = {} 
64
70
    descendants = {}