[MERGE] runtime ignores

Martin Pool mbp at canonical.com
Fri Jul 21 02:36:05 BST 2006


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.

-- 
Martin




More information about the bazaar mailing list