[BUG] test_cat fails to detect
John Arbash Meinel
john at arbash-meinel.com
Mon Apr 23 18:06:26 BST 2007
Martin Pool wrote:
> On 4/20/07, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Submitting to PQM, test_cat broke for me, for no apparent reason. It
>> may be some kind of timing bug in the dirstate code, because it failed
>> to detect the changes that this test case makes.
>>
>> Of course, I was able to merge and resubmit the change later, and it was
...
> dirstate ought to be using the same rule as hashcache that
> recently-changed files cannot be cached...
>
> I can see one possibility other than a dirstate bug, which is
>
> open('a', 'wb').write('foo\n')
>
> That's not being flushed, and it might be possible that it does not
> get gc'd, flushed and closed before the test finishes.
>
> This test is an old one where it always runs bzr in a subprocess,
> rather than in memory as we usually do. But that might catch some
> edge cases I suppose.
>
> (Maybe pqm should run without --verbose so we can more easily see what
> *did* fail?)
>
Well, I would be happy enough if it just didn't change every line into 2
lines. (one blank line inbetween).
My guess is that it is doing something like:
for line in stdout:
print line_from_source
Which causes an extra '\n' to be added.
It would at least make for a more compact readout. But yeah, I agree
that '--verbose' is probably a bit much. I don't think I've ever used it
for anything, and it makes the email a lot bigger.
John
=:->
More information about the bazaar
mailing list