[RFC] deprecation of Tree.path_content_summary()

John Arbash Meinel john at arbash-meinel.com
Thu Aug 20 15:15:15 BST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin Pool wrote:
> 2009/8/20 Ian Clatworthy <ian.clatworthy at canonical.com>:
>> The path_content_summary API was introduced some time back to speed up
>> commit but it's proven to be dangerous in formats (1.14 or later) that
>> support content filtering. This has led to some nasty bugs such as
>> https://bugs.launchpad.net/bzr/+bug/405251.
>>
>> FWIW, we now have a faster commit path that doesn't use this API thanks
>> to work by Robert. I think we ought to deprecate and/or eliminate
>> path_content_summary() for 2.0.
> 
>   https://bugs.launchpad.net/bzr/+bug/415508
> 
> It's ok to deprecate or remove it.  If you're going to do it, do it soon.
> 
> I wouldn't spend too much time checking the plugins if I were you.  If
> we know it's dangerous and should go it doesn't really matter if they
> need to be updated, and they can be updated asynchronously with fixing
> this in bzr.
> 

I'm not sure that it is specifically dangerous. It happened to return a
size of content, which was then taken as absolutely correct, and was
then violated by content filters.

We introduced a bug by adding a feature. It happens. (stacked branches
broke far more than content filtering...)

Probably the bigger problem is that content filtering 'failed open', in
that everything seemed to be working, it just happened to commit *yet
another* text for all filtered files. (So if you have 10k files, and 9k
have a filter set up, every merge was creating 9k more text nodes...)

Given that Martin wants to release a 2.0 and content filters are quite
broken *today*, we need a fix. I personally don't care what it is (it
could be to disable content filters completely, but that seems a bit
overboard).

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqNWnMACgkQJdeBCYSNAANMVQCeJLt4o0Cf+5AFXggv/y+4broc
0qIAniF7VuskiQLpICeplZ0BVAs2dXhS
=94Ui
-----END PGP SIGNATURE-----



More information about the bazaar mailing list