/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

Drop support for bzr 2.0 and 2.1.

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,
204
204
        self._lockfiles = lockfiles
205
205
        self._mode_check_done = None
206
206
 
 
207
    @property
 
208
    def user_url(self):
 
209
        return self.control_url
 
210
 
207
211
    def _branch_name_to_ref(self, name, default=None):
208
212
        return branch_name_to_ref(name, default=default)
209
213
 
269
273
        self._refs = None
270
274
 
271
275
    @property
 
276
    def user_url(self):
 
277
        return self.control_url
 
278
 
 
279
    @property
272
280
    def inventories(self):
273
281
        raise GitSmartRemoteNotSupported()
274
282
 
322
330
        return mapping.revision_id_foreign_to_bzr(foreign_revid)
323
331
 
324
332
 
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
 
333
class RemoteGitTagDict(GitTags):
 
334
 
 
335
    def get_refs(self):
 
336
        return self.repository.get_refs()
 
337
 
 
338
    def _iter_tag_refs(self, refs):
 
339
        for k, (peeled, unpeeled) in extract_tags(refs).iteritems():
 
340
            yield (k, peeled, unpeeled,
 
341
                  self.branch.mapping.revision_id_foreign_to_bzr(peeled))
336
342
 
337
343
    def set_tag(self, name, revid):
338
344
        # FIXME: Not supported yet, should do a push of a new ref
346
352
        super(RemoteGitBranch, self).__init__(bzrdir, repository, name,
347
353
                lockfiles)
348
354
 
 
355
    @property
 
356
    def user_url(self):
 
357
        return self.control_url
 
358
 
 
359
    @property
 
360
    def control_url(self):
 
361
        return self.base
 
362
 
349
363
    def revision_history(self):
350
364
        raise GitSmartRemoteNotSupported()
351
365