[merge] global (per user) ignores and other cleanups

John Arbash Meinel john at arbash-meinel.com
Fri Jul 7 20:52:26 BST 2006


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

Attached is a bundle which implements a global ignore file in
~/.bazaar/ignore

It also extends the is_ignored test suite, to both test regular ignores
and global ignores. Also, I found that we weren't testing for unicode
ignores, and that our current ignored parser wasn't skipping blank
lines, or lines starting with a '#'.

We were just lucky because none of our valid filenames actually included
'#'. So putting a '#" in there meant it wouldn't actually match anything.

Similarly blank lines weren't being ignored, but ^$ only matches empty
filenames, which is pretty rare. :)

Anyway, the attached bundle cleans up all of that. I'm not 100%
convinced that we want a global user ignore, because it is too easy to
use that, rather than properly setting project ignores.
For example, I would be very tempted to add *.py[co] to my personal
global ignores. But that means if someone else checks out my project,
they will get a bunch of unknown files in their tree.

I know Wayne Davison feels very strongly that editor temporary files
should not be in per-project settings. I'm just more concerned about the
opposite. Where a project should be self-contained to ignore the right
things. And *.o and *.py[co] are very likely to end up in a user's
default ignores because they get tired of adding it all the time.

I'm really thinking that a better method would be to have a default
ignore list that when you do 'bzr init' it defaults to adding a user
configurable list of ignores.

(Aaron and Robert can think back to ~/.arch-params/=tagging-method :).

I'm also going to go ahead and do the work to write a command which
writes the old default ignore list to ~/.bazaar/ignore. I'm not 100%
settled that we want it, but it does give us a way to easily migrate
users to 0.9, which will no longer have builtin default ignores.

The other possibility would be that if ~/.bazaar/ignore *doesn't* exist,
it uses the builtin list of default ignores. Which is more of a
compatible upgrade path than our current system.

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

iD8DBQFErrt6JdeBCYSNAAMRAsPJAJ9SRF9uhMSM6DBC3mDrER7Asq+/rQCfd4BG
MdhoAh37p3l9KWhttcWanhE=
=QJEk
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: global-ignores.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20060707/b12aa3b4/attachment.diff 


More information about the bazaar mailing list