~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to dotgraph.py

  • Committer: Aaron Bentley
  • Date: 2005-08-30 18:22:25 UTC
  • Revision ID: abentley@panoramicfeedback.com-20050830182225-e650f373870c640f
Added committer to revisions

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
        self.name = name
10
10
        self.color = color
11
11
        self.label = label
 
12
        self.committer = None
12
13
 
13
14
    def define(self):
 
15
        style = []
14
16
        if self.color is not None:
15
 
            return '%s[fillcolor="%s" style="filled"]' % \
16
 
                (self.name, self.color)
 
17
            style.append('fillcolor="%s"' % self.color)
 
18
            style.append('style="filled"')
 
19
        if self.committer is not None:
 
20
            style.append('label="%s\\n%s"' % (self.name, self.committer))
 
21
        if len(style) > 0:
 
22
            return '%s[%s]' % (self.name, " ".join(style))
17
23
 
18
24
    def __str__(self):
19
25
        return self.name