[MERGE] is_ignored improvements...
Robert Collins
robertc at robertcollins.net
Thu May 18 13:50:57 BST 2006
On Thu, 2006-05-18 at 14:34 +0200, Jan Hudec wrote:
> > The code is very complex compared to the current code, and we end up
> > with two apis rather than one. I'm working on a variation derived from
> > your work, which will combine the regexes but only need the single API.
> > I'll post that up shortly, and I'd appreciate your review on this, as I
> > know you put a lot of thought into the is_ignored work in your branch.
>
> The two interfaces are there because python has arbitrary limit of 100
> match groups in a pattern. So if I wanted to tell which pattern matched
> (the user interface displays that), I had to do the match bunch at a
> time rather than all at once. But in many places just a boolean is
> wanted, so all patterns can be matched at once, without captures.
>
> The code is more complex than necessary because I didn't remove all the
> stuff needed for switching between different glob types -- which is not
> needed when there is just one.
Ah! Just a note - I think things like this are extremely important to
keep in the documentation, or people (like me:)) will forget them.
So I have a branch here that does that, but it doesn't honour the 100
regex group limit.
I'm attaching that patch for consideration. I'm currently of the opinion
that having a single interface is easier for users, and stopping at
every 100 ignores for another match isn't all that bad IMO - while non
optimal its possible for us to change that 100 limit in the future, or
replace the implementation under the hood.
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: is_ignored-one-regex.patch
Type: text/x-patch
Size: 12071 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060518/99af8c3f/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060518/99af8c3f/attachment.pgp
More information about the bazaar
mailing list