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

Re: Regular expressions in Subversion

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Wed, 17 Oct 2012 19:53:57 +0200

On 17.10.2012 18:20, Hyrum K Wright wrote:
> There are several places where regular expressions would be useful in
> Subversion. Off hand, the new log --search feature and svn:ignore
> properties feel like they'd be use candidates for regexs, and they
> could probably also apply to authz rules eventually. I'm sure there
> are more.
>
> Historically, the argument against using regexes in Subversion was
> that they would be a potential DoS target, or could lead to unexpected
> performance problems. However, I recently ran across a new regex
> engine, RE2, which claims to have linear time complexity in the size
> of the input with the ability to also limit memory consumption[1].
> These come at the expenses of a couple of less-used regex features,
> and it feels like it'd be a good fit for Subversion.
>
> There are a few downsides:
> * RE2 is written in C++; we'd need a C wrapper to use it within Subversion.
> * RE2 packages don't exist for a number of platforms, though we might
> be able to embedded it in Subversion.
> * RE2 doesn't claim to compile on Windows. :)
>
> Anyway, I was just wondering what folks feelings were about this
> possibility, and whether it's finally time to start thinking about
> proper regex support within Subversion.

I'm wondering: if C++ is an option, why not use the regex that comes
with the C++ library itself?
http://en.cppreference.com/w/cpp/regex

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
Received on 2012-10-17 19:54:39 CEST

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.