Rev 2749: Review feedback. in http://people.ubuntu.com/~robertc/baz2.0/transport
Robert Collins
robertc at robertcollins.net
Thu Oct 4 05:59:52 BST 2007
At http://people.ubuntu.com/~robertc/baz2.0/transport
------------------------------------------------------------
revno: 2749
revision-id: robertc at robertcollins.net-20071004045943-1wxlrsr37yppwp64
parent: robertc at robertcollins.net-20071002053339-vnyjf4jrxv0jeekf
committer: Robert Collins <robertc at robertcollins.net>
branch nick: transport-get-file
timestamp: Thu 2007-10-04 14:59:43 +1000
message:
Review feedback.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/test_knit.py test_knit.py-20051212171302-95d4c00dd5f11f2b
bzrlib/transport/trace.py trace.py-20070828055009-7kt0bbc4t4b92apz-1
=== modified file 'NEWS'
--- a/NEWS 2007-08-27 04:19:49 +0000
+++ b/NEWS 2007-10-04 04:59:43 +0000
@@ -57,6 +57,9 @@
* NULL_REVISION is returned to indicate the null revision, not None.
(Aaron Bentley)
+ * Removed ``bzrlib.transport.TransportLogger`` - please see the new
+ ``trace+`` transport instead. (Robert Collins)
+
INTERNALS:
* New trace function ``mutter_callsite`` will print out a subset of the
@@ -86,6 +89,9 @@
put by the method call, to allow avoiding stat-after write or
housekeeping in callers. (Robert Collins)
+ * New transport implementation ``trace+`` which is useful for testing,
+ logging activity taken to its _activity attribute. (Robert Collins)
+
bzr 0.90 2007-08-??
===================
=== modified file 'bzrlib/tests/test_knit.py'
--- a/bzrlib/tests/test_knit.py 2007-10-02 05:33:39 +0000
+++ b/bzrlib/tests/test_knit.py 2007-10-04 04:59:43 +0000
@@ -1313,6 +1313,8 @@
k1.add_lines('base', [], ['text\n'])
k1.add_lines('base2', [], ['text2\n'])
k1.clear_cache()
+ # clear the logged activity, but preserve the list instance in case of
+ # clones pointing at it.
del instrumented_t._activity[:]
# request a last-first iteration
results = list(k1.iter_lines_added_or_present_in_versions(
=== modified file 'bzrlib/transport/trace.py'
--- a/bzrlib/transport/trace.py 2007-10-02 05:33:39 +0000
+++ b/bzrlib/transport/trace.py 2007-10-04 04:59:43 +0000
@@ -16,7 +16,7 @@
"""Implementation of Transport that traces transport operations.
-This does not change the transport behaviour at allmerely records every call
+This does not change the transport behaviour at all, merely records every call
and then delegates it.
"""
@@ -29,6 +29,14 @@
Calls that potentially perform IO are logged to self._activity. The
_activity attribute is shared as the transport is cloned, but not if a new
transport is created without cloning.
+
+ Not all operations are logged at this point, if you need an unlogged
+ operation please add a test to the tests of this transport, for the logging
+ of the operation you want logged.
+
+ Another future enhancement would be to log to bzrlib.trace.mutter when
+ trace+ is used from the command line (or perhaps as well/instead use
+ -Dtransport), to make tracing operations of the entire program easily.
"""
def __init__(self, url, _decorated=None, _from_transport=None):
@@ -150,9 +158,5 @@
def get_test_permutations():
- """Return the permutations to be used in testing.
-
- The Decorator class is not directly usable, and testing it would not have
- any benefit - its the concrete classes which need to be tested.
- """
+ """Return the permutations to be used in testing."""
return [(TransportTraceDecorator, TraceServer)]
More information about the bazaar-commits
mailing list