[merge][rfc] log+ transport decorator

Martin Pool mbp at sourcefrog.net
Tue Sep 2 08:43:44 BST 2008


On Tue, Sep 2, 2008 at 3:21 PM, Robert Collins
<robertc at robertcollins.net> wrote:
> On Tue, 2008-09-02 at 15:08 +1000, Martin Pool wrote:
>> On Tue, Sep 2, 2008 at 2:57 PM, Robert Collins
>> <robertc at robertcollins.net> wrote:
>> > This looks nice, I'm not clear about the log+ vs trace+ relationship
>> > from the diff alone - can you expand on that please?
>>
>> trace captures them into an instance variable so that it can be
>> inspected by a test that wants to eg make effort assertions about what
>> IO is done.  (This was existing code, which I think you added.)  log+
>> writes it to .bzr.log for ad-hoc debugging.
>
> Yes, thats the _difference_. Whats the relationship? Aren't they very
> similar? Is one a subclass, to avoid duplication, or are their needs so
> different that this won't work? I know I wrote trace+ with the intent of
> it being available for a log+ behaviour in the future (as the docstring
> patch you have removes that comment I know you know that too :)).

They are conceptually similar.  There is no technical relationship; I
originally started out intending to subclass trace+, but it did not
offer much beyond what is in TransportDecorator.  There's no code
duplication between them, so my motivation to try to extract a common
class fell.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list