~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/log.py

  • Committer: Martin Pool
  • Date: 2010-02-25 06:17:27 UTC
  • mfrom: (5055 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5057.
  • Revision ID: mbp@sourcefrog.net-20100225061727-4sd9lt0qmdc6087t
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007 Canonical Ltd
 
1
# Copyright (C) 2008, 2009, 2010 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.decorator import (
30
 
    TransportDecorator,
31
 
    )
32
 
from bzrlib.transport.trace import (
33
 
    DecoratorServer,
34
 
    TransportTraceDecorator,
35
 
    )
36
 
 
37
 
 
38
 
 
39
 
 
40
 
class TransportLogDecorator(TransportDecorator):
 
29
from bzrlib.transport import decorator
 
30
 
 
31
 
 
32
class TransportLogDecorator(decorator.TransportDecorator):
41
33
    """Decorator for Transports that logs interesting operations to .bzr.log.
42
34
 
43
35
    In general we want to log things that usually take a network round trip
156
148
        return t
157
149
 
158
150
 
159
 
class LogDecoratorServer(DecoratorServer):
160
 
    """Server for testing."""
161
 
 
162
 
    def get_decorator_class(self):
163
 
        return TransportLogDecorator
164
 
 
165
 
 
166
151
def get_test_permutations():
167
152
    """Return the permutations to be used in testing."""
168
 
    return [(TransportLogDecorator, LogDecoratorServer)]
 
153
    from bzrlib.tests import test_server
 
154
    return [(TransportLogDecorator, test_server.LogDecoratorServer)]