Rule-based preferences - format marker RFC, etc.
John Arbash Meinel
john at arbash-meinel.com
Wed Jun 25 15:24:35 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ian Clatworthy wrote:
| Martin Pool wrote:
|> I spoke with Ian a bit about that this morning.
|>
|> We plan to put a namespace in the section headers something like
|>
|> [name *.py]
|>
|> ('name' vs 'glob' vs 'pattern' etc Ian is going to ponder)
|
| Pondering complete. :-)
|
|> I don't think this needs special handling by file id. In general we
|> need to do many lookups by filename and we should try to make that
|> fast. Let's land this.
|
| Latest version attached. It provides:
|
| * a namespace - I've gone with 'for' for readability reasons
| * an error if an unknown namespace is detected
| * a 'patterns' topic as requested by John's review
| * that topic is now referenced from the help for ignore
|
| John also suggested refactoring the tests to use a string for
| the test text instead of lines. I can do that once there's agreement
| on the prefix. (Right now, I've kept the old approach in the
| tests and I'm patching in the namespace so it's easy to tweak it.)
|
| John raised one other issue I'm yet to reply to. I'll do that
| in a separate email.
|
| Ian C.
|
My personal feeling is to go with glob and disallow RE:, because we can
just as well use "regex" for that. So you would have:
[glob *.bat]
[regex .*\.bat]
rather than
[for *.bat]
[for RE:.*\.bat]
I'm not as concerned about people thinking "for" means a loop. I
understand the attempt at English and saying "for my .bat files do
this". That said, I don't particularly like "for". And I feel that
"glob, regex, and id" are a better way of doing it.
The reason we had to do the RE: hack for the existing .bzrignore is
because we didn't have 'glob' to indicate it wasn't a regex. I'd sort of
rather we didn't propagate that mistake. (Because we don't have version
markers, etc, we didn't really have any way to upgrade the syntax for
.bzrignore, so we mostly just wedged something in there.)
So my first vote is to go with glob/regex/id, my second is probably
"name" to define what you are trying to match rather than trying to make
it an English sentence.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkhiVSIACgkQJdeBCYSNAANhzgCfQRqvb6QNAOFsM/C9WD6rOjq5
2A8An1UeJ61W6OsWVZbTtk/dH7KZNHfs
=t/D3
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list