~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/fakevfat.py

  • Committer: Danny van Heumen
  • Date: 2010-03-09 21:42:11 UTC
  • mto: (4634.139.5 2.0)
  • mto: This revision was merged to the branch mainline in revision 5160.
  • Revision ID: danny@dannyvanheumen.nl-20100309214211-iqh42x6qcikgd9p3
Reverted now-useless TODO list.

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 import decorator
 
44
from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
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(decorator.TransportDecorator):
 
55
class FakeVFATTransportDecorator(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
 
102
112
def get_test_permutations():
103
113
    """Return the permutations to be used in testing."""
104
 
    from bzrlib.tests import test_server
105
 
    return [(FakeVFATTransportDecorator, test_server.FakeVFATServer),]
 
114
    return [(FakeVFATTransportDecorator, FakeVFATServer),
 
115
            ]