[patch] improved ignore pattern matching (#57637)
warthog618 at gmail.com
Sun Nov 26 14:02:02 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Jan Hudec wrote:
>> Just a comment
>> - Standard shell patterns are fine (no extensions needed)
> No, they are not. One extension -- the ** -- is needed. How would
> you say 'all .o files under lib (wole subtree)' with standard shell
> patterns? (Just a note -- in standard shell patterns * does NOT
> match /)
Ahhh, that is one of those hard to reach places where you would use a
regex ('RE:lib/.*\.o') ;-).
No - I agree that having a shell extension to match '/' in paths would
be useful, as would something to match leading '.', since that is also
not matched by * in shell.
The question is whether '**' should match '/' AND leading '.', as per
rsync, or just '/' as per zsh, or some other solution.
>> About backwards comaptibility:
>> - The ignore patterns file should have line "version: N" to tell
>> to what bzr version they were created.
>> if ! version complain and quit. Version tag must be there.
>> "Ignore pattern files must contain version number. See manual
> This is backwards incompatible. Remember, that it's a normal
> versioned file...
I agree - that isn't how I would implement it either - it would be
X = read_version_from_bzrignore()
use globber for version X
use existing fnmatch globber
The problem with this is that to upgrade away from the broken fnmatch
globbing behaviour you need to patch the .bzrignore file, and as you
mention this is a normal versioned file. So only new or patched
branches would see the fix.
Making the ignores an internal property would allow us to side step
that problem - but then we would need to switch from .bzrignore to
internal properties prior to rolling out any pattern matching fixes.
I had hoped people would be more concerned with getting a fast and
correct globbing fix out there than being 100% backwards compatible.
I seem to have underestimated the importance of being bug compatible
when fixing bugs in bzr.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar