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

MergeĀ upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    tag,
24
24
    )
25
25
from bzrlib.decorators import needs_read_lock
26
 
from bzrlib.trace import mutter
27
26
 
28
27
from bzrlib.plugins.git.foreign import ForeignBranch
29
28
 
30
 
from dulwich.objects import (
31
 
        Commit,
32
 
        Tag,
33
 
        )
34
 
 
35
29
class GitTagDict(tag.BasicTags):
36
30
 
37
31
    def __init__(self, branch):
41
35
    def get_tag_dict(self):
42
36
        ret = {}
43
37
        for k,v in self.repository._git.tags.iteritems():
44
 
            obj = self.repository._git.get_object(v)
45
 
            while isinstance(obj, Tag):
46
 
                v = obj.object[1]
47
 
                obj = self.repository._git.get_object(v)
48
 
            if not isinstance(obj, Commit):
49
 
                mutter("Tag %s points at object %r that is not a commit, ignoring", k, obj)
50
 
                continue
51
38
            ret[k] = self.branch.mapping.revision_id_foreign_to_bzr(v)
52
39
        return ret
53
40