[fixed] ignore problem

Andrew Bennetts andrew.bennetts at canonical.com
Thu Apr 7 03:51:42 UTC 2011


Steve Franks wrote:
> Might I humbly suggest that a methodology for ignoring files per
> folder would allow me to avoid having one bloated file causing this
> trouble in the first place?  I'm sure someone thought of a really
> stellar reason why that would be "bad", well, here's at least one
> reason the alternative is "bad".

Ignore rules can be restricted to individual directories.  e.g. here are
some rules from bzr's own .bzrignore file:

./build
./doc/en/user-reference/*.txt
./doc/**/*.html

Is that not enough for what you want to do?

I think the main reason we don't support a .bzrignore file per directory
is performance: having to search for many files is going to be much
slower than looking for exactly one.  Also it would probably be a bit
more complex to efficiently compile the rules into single regex if they
came from multiple sources found as we walked the tree during a 'bzr st'
or 'bzr add' (and walking the tree completely in advance just to find
any per-directory ignore files would definitely hurt performance).

-Andrew.




More information about the bazaar mailing list