[MERGE] runtime ignores
John Arbash Meinel
john at arbash-meinel.com
Fri Jul 21 03:26:28 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool wrote:
> On 20 Jul 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
>> Adeodato Simó had a reasonable use case for allowing plugins to add
>> ignores only at runtime. The attached plugin gives them an actual api to
>> use to do this, rather than modifying a list.
>>
>> Further, it changes the ignore functions to use sets rather than lists.
>> Mostly this is because now we have 4 ways that files get ignored:
>>
>> 1) Plugins add them to DEFAULT_IGNORE, this is deprecated but still
>> supported for now.
>> 2) Plugins add them to the runtime list with 'add_runtime_ignores'.
>> 3) User global ignores in ~/.bazaar/ignore
>> 4) Project specific ignores in .bzrignore
>>
>> Just to be efficient I'm using a set, so that if there are overlaps, the
>> total size of the regex doesn't grow without bound.
>>
>> I'd like to get this in soon, so that bzrtools can update to using it if
>> present.
>> Because right now seeing the DEPRECATION warning everytime I run bzr is
>> a little bit annoying.
>
> I think it's reasonable for 0.9. My only query would be about exposing
> them as sets - is there a risk that people will accidentally reorder the
> user's ignores by writing them back out? I think we only append to that
> file so it should be safe.
>
I intentionally only append to the user's ignores, in case they also
added comments, etc.
The only problem is if someone calls 'set_user_ignores' and added some
entries themselves.
I probably should make 'set_user_ignores' a private function. I only
really wanted it for the test suite.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEwDtTJdeBCYSNAAMRAmoYAKC12YpafLzR5hqw7D2wubY3wnBSZwCdGnnY
xPx2hWHlFMQazbIeEpKqbMA=
=tj95
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list