~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/fakevfat.py

  • Committer: John Arbash Meinel
  • Date: 2009-06-19 17:53:37 UTC
  • mto: This revision was merged to the branch mainline in revision 4466.
  • Revision ID: john@arbash-meinel.com-20090619175337-uozt3bntdd48lh4z
Update time_graph to use X:1 ratios rather than 0.xxx ratios.
It is just easier to track now that the new code is much faster.

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
            ]