~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to graph.py

  • Committer: Aaron Bentley
  • Date: 2005-09-20 14:56:10 UTC
  • Revision ID: abentley@panoramicfeedback.com-20050920145610-2c132f1899788810
Fixed username-in-ancestry-graph issue

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
                 'robertc@robertcollins.net'     : 'Robert Collins',
18
18
                })
19
19
 
 
20
committer_alias = {'abentley': 'Aaron Bentley'}
 
21
 
20
22
def add_relations(rev_id):
21
23
    if rev_id in ancestors:
22
24
        return
125
127
def get_committer(rev_id, source):
126
128
    try:
127
129
        committer = short_committer(source.get_revision(rev_id).committer)
128
 
        if '@' in committer:
129
 
            try:
130
 
                return mail_map[committer]
131
 
            except KeyError:
132
 
                pass
133
 
        return committer
134
130
    except NoSuchRevision:
135
131
        try:
136
 
            first_segment = '-'.join(rev_id.split('-')[:-2])\
 
132
            committer = '-'.join(rev_id.split('-')[:-2])\
137
133
                .strip(' ')
138
134
        except ValueError:
139
 
            first_segment = []
140
 
        if '@' in first_segment:
141
 
            try:
142
 
                return mail_map[first_segment]
143
 
            except KeyError:
144
 
                return first_segment
 
135
            committer = '' 
 
136
    if '@' in committer:
 
137
        try:
 
138
            committer = mail_map[committer]
 
139
        except KeyError:
 
140
            pass
 
141
    try:
 
142
        committer = committer_alias[committer]
 
143
    except KeyError:
 
144
        pass
 
145
    return committer
145
146
 
146
147
 
147
148
def graph_merge_pick(branch, other_branch):