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

Import tags when pulling.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 
43
43
from bzrlib.plugins.git.branch import (
44
44
    GitBranch,
 
45
    extract_tags,
45
46
    )
46
47
from bzrlib.plugins.git.errors import (
47
48
    GitSmartRemoteNotSupported,
269
270
        self.repository = branch.repository
270
271
 
271
272
    def get_tag_dict(self):
272
 
        ret = {}
273
 
        refs = self.repository.get_refs()
274
 
        for k,v in refs.iteritems():
275
 
            if k.startswith("refs/tags/") and not k.endswith("^{}"):
276
 
                v = refs.get(k+"^{}", v)
277
 
                ret[k[len("refs/tags/"):]] = self.branch.mapping.revision_id_foreign_to_bzr(v)
278
 
        return ret
 
273
        return extract_tags(self.repository.get_refs(), self.branch.mapping)
279
274
 
280
275
    def set_tag(self, name, revid):
281
276
        # FIXME: Not supported yet, should do a push of a new ref