~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to graph.py

  • Committer: Aaron Bentley
  • Date: 2006-12-21 05:41:05 UTC
  • mfrom: (476.1.1 bzrtools)
  • Revision ID: aaron.bentley@utoronto.ca-20061221054105-r6a8njsyixw9998r
graph-ancestry shows branch nick

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
    message = None
78
78
    date = None
79
79
    if rev_id == 'null:':
80
 
        return None, 'Null Revision', None
 
80
        return None, 'Null Revision', None, None
81
81
    try:
82
82
        rev = source.get_revision(rev_id)
83
83
    except NoSuchRevision:
84
84
        try:
85
85
            committer = '-'.join(rev_id.split('-')[:-2]).strip(' ')
86
86
            if committer == '':
87
 
                return None, None, None
 
87
                return None, None, None, None
88
88
        except ValueError:
89
 
            return None, None, None
 
89
            return None, None, None, None
90
90
    else:
91
91
        committer = short_committer(rev.committer)
92
92
        if rev.message is not None:
93
93
            message = rev.message.split('\n')[0]
94
94
        gmtime = time.gmtime(rev.timestamp + (rev.timezone or 0))
95
95
        date = time.strftime('%Y/%m/%d', gmtime)
 
96
        nick = rev.properties.get('branch-nick')
96
97
    if '@' in committer:
97
98
        try:
98
99
            committer = mail_map[committer]
102
103
        committer = committer_alias[committer]
103
104
    except KeyError:
104
105
        pass
105
 
    return committer, message, date
 
106
    return committer, message, nick, date
106
107
 
107
108
class Grapher(object):
108
109
    def __init__(self, branch, other_branch=None):
174
175
            color = "#33ff99"
175
176
 
176
177
        label = [name]
177
 
        committer, message, date = get_rev_info(node, self.branch.repository)
 
178
        committer, message, nick, date = get_rev_info(node, 
 
179
                                                      self.branch.repository)
178
180
        if committer is not None:
179
181
            label.append(committer)
180
182
 
 
183
        if nick is not None:
 
184
            label.append(nick)
 
185
 
181
186
        if date is not None:
182
187
            label.append(date)
183
188