~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/log.py

  • Committer: Vincent Ladeuil
  • Date: 2010-02-09 17:15:17 UTC
  • mto: (5029.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5030.
  • Revision ID: v.ladeuil+lp@free.fr-20100209171517-1wzz1nh3d3nhnkbu
Move ReadonlyServer to bzrlib.tests.readonly

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008, 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
26
26
import types
27
27
 
28
28
from bzrlib.trace import mutter
29
 
from bzrlib.transport import decorator
30
 
 
31
 
 
32
 
class TransportLogDecorator(decorator.TransportDecorator):
 
29
from bzrlib.transport.decorator import (
 
30
    TransportDecorator,
 
31
    )
 
32
from bzrlib.transport.trace import (
 
33
    DecoratorServer,
 
34
    TransportTraceDecorator,
 
35
    )
 
36
 
 
37
 
 
38
 
 
39
 
 
40
class TransportLogDecorator(TransportDecorator):
33
41
    """Decorator for Transports that logs interesting operations to .bzr.log.
34
42
 
35
43
    In general we want to log things that usually take a network round trip
148
156
        return t
149
157
 
150
158
 
 
159
class LogDecoratorServer(DecoratorServer):
 
160
    """Server for testing."""
 
161
 
 
162
    def get_decorator_class(self):
 
163
        return TransportLogDecorator
 
164
 
 
165
 
151
166
def get_test_permutations():
152
167
    """Return the permutations to be used in testing."""
153
 
    from bzrlib.tests import test_server
154
 
    return [(TransportLogDecorator, test_server.LogDecoratorServer)]
 
168
    return [(TransportLogDecorator, LogDecoratorServer)]