~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/fakevfat.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
import re
42
42
 
43
43
from bzrlib.errors import TransportNotPossible
44
 
from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
 
44
from bzrlib.transport import decorator
45
45
 
46
46
 
47
47
# TODO: It might be nice if these hooks were available in a more general way
52
52
# which are not implemented here fail by default?
53
53
 
54
54
 
55
 
class FakeVFATTransportDecorator(TransportDecorator):
 
55
class FakeVFATTransportDecorator(decorator.TransportDecorator):
56
56
    """A decorator that can convert any transport to be readonly.
57
57
 
58
58
    This is requested via the 'vfat+' prefix to get_transport().
99
99
        return self._decorated.put_file(self._squash_name(relpath), f, mode)
100
100
 
101
101
 
102
 
class FakeVFATServer(DecoratorServer):
103
 
    """A server that suggests connections through FakeVFATTransportDecorator
104
 
 
105
 
    For use in testing.
106
 
    """
107
 
 
108
 
    def get_decorator_class(self):
109
 
        return FakeVFATTransportDecorator
110
 
 
111
 
 
112
102
def get_test_permutations():
113
103
    """Return the permutations to be used in testing."""
114
 
    return [(FakeVFATTransportDecorator, FakeVFATServer),
115
 
            ]
 
104
    from bzrlib.tests import test_server
 
105
    return [(FakeVFATTransportDecorator, test_server.FakeVFATServer),]