Code review comment for lp:~lifeless/bzr/loomsupport

Revision history for this message
Robert Collins (lifeless) wrote :

On Thu, Jun 24, 2010 at 6:40 PM, John Szakmeister <email address hidden> wrote:
> On Thu, Jun 24, 2010 at 4:32 AM, Robert Collins

>> @@ -272,10 +277,14 @@
>>         calls_after_insert_stream = hpss_call_names[insert_stream_idx:]
>>         # After inserting the stream the client has no reason to query the
>>         # remote graph any further.
>> -        self.assertEqual(
>> -            ['Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
>> -             'get', 'Branch.set_last_revision_info', 'Branch.unlock'],
>> -            calls_after_insert_stream)
>> +        bzr_core_trace = Equals(
>> +            ['Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
>> +             'get', 'Branch.set_last_revision_info', 'Branch.unlock'])
>> +        bzr_loom_trace = Equals(
>> +            ['Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
>> +             'get', 'Branch.set_last_revision_info', 'get', 'Branch.unlock'])
>> +        self.assertThat(calls_after_insert_stream,
>> +            MatchesAny(bzr_core_trace, bzr_loom_trace))
>
> This is probably my ignorance, but bzr_loom_trace and bzr_core_trace
> look identical.  How does this help?  Thanks for the forthcoming
> education. :-)

Its a little subtle, and I could have played list slicing tricks to
make it more obvious, but at a cost in reading each trace, so I did it
the way I did.

here's a side-by-side comparison:
'Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
'Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
'get', 'get',
'Branch.set_last_revision_info', 'Branch.set_last_revision_info',
'get',
'Branch.unlock' 'Branch.unlock',

-Rob

« Back to merge proposal