/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

Don't peel tags automatically when pushing back.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
from bzrlib import (
18
18
    config,
19
19
    debug,
20
 
    tag,
21
20
    trace,
22
21
    ui,
23
22
    urlutils,
40
39
 
41
40
from bzrlib.plugins.git.branch import (
42
41
    GitBranch,
 
42
    GitTags,
43
43
    )
44
44
from bzrlib.plugins.git.errors import (
45
45
    GitSmartRemoteNotSupported,
322
322
        return mapping.revision_id_foreign_to_bzr(foreign_revid)
323
323
 
324
324
 
325
 
class RemoteGitTagDict(tag.BasicTags):
326
 
 
327
 
    def __init__(self, branch):
328
 
        self.branch = branch
329
 
        self.repository = branch.repository
330
 
 
331
 
    def get_tag_dict(self):
332
 
        tags = {}
333
 
        for k, v in extract_tags(self.repository.get_refs()).iteritems():
334
 
            tags[k] = self.branch.mapping.revision_id_foreign_to_bzr(v)
335
 
        return tags
 
325
class RemoteGitTagDict(GitTags):
 
326
 
 
327
    def _iter_tag_refs(self, refs):
 
328
        for k, (peeled, unpeeled) in extract_tags(refs).iteritems():
 
329
            yield (k, peeled, unpeeled,
 
330
                  self.branch.mapping.revision_id_foreign_to_bzr(peeled))
336
331
 
337
332
    def set_tag(self, name, revid):
338
333
        # FIXME: Not supported yet, should do a push of a new ref