[patch] improved ignore pattern matching (#57637)
Jari Aalto
jari.aalto at cante.net
Sun Nov 26 09:22:13 GMT 2006
Kent Gibson <warthog618 at gmail.com> writes:
> >
> Further, I mailed to the list several weeks ago regarding what style
> extension styles people would prefer.
> Still not one reply. You could take that to mean no one is interested
> in having those extensions added at all.
>
[...]
> I think there has to be a point at which you give up on maintaining
> backwards compatibility cos it's just not worth it. Rather than
> taking heroic measures to retain the existing ignore behaviour for old
> installations it is better to clearly warn that there is a behavioural
> change and be done with it. This is one of those cases.
Just a comment
- Standard shell patterns are fine (no extensions needed)
- Regexp patterns would be great
Being able to select between either of these a) globally) or b)
line-by-line basis is all that I would need. Meaning, that bzr wold
default to shell style and only if 'magic' word appears in front of
lines, then the line would be treated as regexp:
*.o
regexp::some.*silly.*path
Whitespace should not be allowed in regexp lines, but the some
regexp-shortcut to substitute it. Like Perl's well known \s.
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 ..."
else if ( version = bzr version now)
continue
else if ( version != bzr version now)
Check if bzr internal patterns have had changes since. If they
have, quit and print error: "Patterns have changed since bzr
version XXX found in ignore file. Please update ignore file to
current standard and update at the same time 'version' field to
current bzr version which is YYY"
Jari
More information about the bazaar
mailing list