/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to filegraph.py

Initial work on annotate support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
            if parent_commits == []:
54
54
                break
55
55
            commit = parent_commits[0]
56
 
        return (path, commit.id)
 
56
        raise KeyError
57
57
 
58
58
 
59
59
class GitFileParentProvider(object):
68
68
        path = mapping.parse_file_id(file_id)
69
69
        text_parents = []
70
70
        for commit_parent in self.store[commit_id].parents:
71
 
            (_, text_parent) = self.change_scanner.find_last_change_revision(path, commit_parent)
 
71
            try:
 
72
                (path, text_parent) = self.change_scanner.find_last_change_revision(path, commit_parent)
 
73
            except KeyError:
 
74
                continue
72
75
            if text_parent not in text_parents:
73
76
                text_parents.append(text_parent)
74
77
        return tuple([(file_id,
80
83
        for key in keys:
81
84
            (file_id, text_revision) = key
82
85
            if text_revision == NULL_REVISION:
 
86
                ret[key] = ()
83
87
                continue
84
88
            try:
85
89
                ret[key] = self._get_parents(file_id, text_revision)