/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/transport/decorator.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from __future__ import absolute_import
24
24
 
25
 
from bzrlib import transport
26
 
 
27
 
 
28
 
class TransportDecorator(transport.Transport):
 
25
from . import (Transport, get_transport)
 
26
 
 
27
 
 
28
class TransportDecorator(Transport):
29
29
    """A no-change decorator for Transports.
30
30
 
31
31
    Subclasses of this are new transports that are based on an
52
52
                             (url, prefix))
53
53
        not_decorated_url = url[len(prefix):]
54
54
        if _decorated is None:
55
 
            self._decorated = transport.get_transport(
56
 
                not_decorated_url)
 
55
            self._decorated = get_transport(not_decorated_url)
57
56
        else:
58
57
            self._decorated = _decorated
59
58
        super(TransportDecorator, self).__init__(prefix + self._decorated.base)
90
89
        return self._decorated.delete_tree(relpath)
91
90
 
92
91
    def external_url(self):
93
 
        """See bzrlib.transport.Transport.external_url."""
 
92
        """See breezy.transport.Transport.external_url."""
94
93
        # while decorators are in-process only, they
95
 
        # can be handed back into bzrlib safely, so
 
94
        # can be handed back into breezy safely, so
96
95
        # its just the base.
97
96
        return self.base
98
97