/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 repository.py

Cope with API changes in Dulwich.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    )
59
59
 
60
60
 
61
 
class GitTags(object):
62
 
 
63
 
    def __init__(self, tags):
64
 
        self._tags = tags
65
 
 
66
 
    def __iter__(self):
67
 
        return iter(self._tags)
68
 
 
69
 
 
70
61
class GitRepository(ForeignRepository):
71
62
    """An adapter to git repositories for bzr."""
72
63
 
125
116
        self.revisions = versionedfiles.VirtualRevisionTexts(self)
126
117
        self.inventories = versionedfiles.VirtualInventoryTexts(self)
127
118
        self.texts = GitTexts(self)
128
 
        self.tags = GitTags(self._git.get_tags())
129
119
 
130
120
    def all_revision_ids(self):
131
121
        ret = set([revision.NULL_REVISION])
132
 
        heads = self._git.heads()
 
122
        heads = self._git.refs.as_dict('refs/heads')
133
123
        if heads == {}:
134
124
            return ret
135
125
        bzr_heads = [self.get_mapping().revision_id_foreign_to_bzr(h) for h in heads.itervalues()]