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

Re: regexp matching in svn?

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Tue, 31 Jan 2012 14:07:44 +0100

On Sat, Jan 28, 2012 at 2:45 PM, Johan Corveleyn <jcorvel_at_gmail.com> wrote:
> On Sat, Jan 28, 2012 at 10:10 AM, Johan Corveleyn <jcorvel_at_gmail.com> wrote:
> [ ... ]
>> Other than that, there is something about GNU diff's -F option that I
>> don't like: it doesn't trim leading whitespace from the matched
>> "function line", unlike the -p option.
> Sorry, I made a mistake here, I misinterpreted some output. There is
> no such stripping of leading whitespace from the "function-line"
> anywhere. It just so happens that -p only matches lines which start
> with non-whitespace.
> (stripping leading whitespace in case of -F would be useful though, if
> it were up to me ... gives you more significant context in those 40/50
> characters)

Apparently, stripping leading whitespace from the function-line with
the -F option is implemented in GNU diff as of version 3.0 [1]. So
that's interesting, it makes that particular argument moot.

Only problem is: the most recent version of diffutils which I can find
for Windows is 2.9 (Cygwin has diffutils-2.9, gnuwin32 has
diffutils-2.8.7). I added a request to the forum of gnuwin32 [2] to
produce a newer release of diffutils, but I don't really expect
anything soon.

Anyway, I'm not going to pursue this any further in svn myself, unless
one day some regex capability magically appears.

My most immediate problem is solved, because that's about generating
nice diffs on the server for post-commit emails. My server runs on
Solaris, and we have diffutils 3.2 installed now. Problem solved
(except that svnlook doesn't support --diff-cmd, so I have to fall
back to 'svn' for this, but anyway ...).

[1] http://savannah.gnu.org/forum/forum.php?forum_id=6319
[2] https://sourceforge.net/tracker/?func=detail&aid=3482130&group_id=23617&atid=379176
Received on 2012-01-31 14:08:38 CET

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