[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Regexp support for svn:ignore

From: Osku Salerma <osku_at_iki.fi>
Date: 2006-06-19 20:10:02 CEST

On Mon, 19 Jun 2006, Garrett Rooney wrote:

> On 6/17/06, Osku Salerma <osku@iki.fi> wrote:
>
> > The patch is more or less a proof-of-concept, with at least the following
> > issues to be decided/solved before it can be finished:
> >
> > * Do we even want to add a new dependency for a regexp library?
>
> I'm not overly thrilled with this honestly...

If it was only used for svn:ignore, it probably wouldn't be worth it. But
I seem to recall there being messages on the lists from people wanting
regexp support for other things (various config files come to mind), so I
expect once we'd be through the pain of introducing the library
dependency, it would find other uses.

> > * If we use PCRE, how do we handle
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=27550 ? Apache bundles
> > its own version of PCRE, and if an Apache module links to an external
> > PCRE, there are problems. I assume mod_dav_svn would be affected by
> > this. The bug report claims it's fixed in Apache 2.1, but I suppose we
> > must support Apache 2.0.
>
> Yeah, that would be an issue to work around. Maybe if we're building
> mod_dav_svn we use Apache's version of PCRE?

It's an idea, dunno if it's a workable idea or not. As long as we only use
PCRE in libsvn_wc, we might punt on the above issue, only link libsvn_wc
with PCRE, and hope Apache 2.1+ is widely used soon.

> > * Error handling. The attached patch dies on errors (invalid regexp,
> > invalid UTF-8, etc). Do we want to silently ignore errors, modify
> > svn_wc_match_ignore_list to return possible errors, or what?
>
> Maybe evaluate them at parse time to see if they're invalid?

They are evaluted, by PCRE, I'm talking about what to do with the error
codes/messages PCRE returns when it fails.

One option would be to check the patterns for validness in the client when
propediting svn:ignore, and refuse the change if the regexps aren't valid.
That's not foolproof by any means but in practise it might be good enough
so that we could simply ignore errors when actually using svn:ignore.

--
Osku Salerma - osku_at_iki.fi - http://www.oskusoft.com/osku/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 19 20:11:03 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.