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

[PATCH] fix to svnperms.py to allow regex's that start with '['

From: Chris Leishman <chris_at_leishman.org>
Date: 2005-07-27 06:28:18 CEST

The '[' character is a legitimate start to a regular expression - for
example in '[^/]+/tags' to match a tags directory inside any single
parent directory. Unfortunately, the regex match for section headers
treats such a regex as the start of a new section (named '^/').

This patch fixes that behaviour by making the section match check that
nothing follows the section header on the line.

cheers,
chris

--- svnperms.py.orig 2005-07-27 14:09:57.000000000 +1000
+++ svnperms.py 2005-07-27 14:20:02.000000000 +1000
@@ -14,7 +14,7 @@
 
 class Error(Exception): pass
 
-SECTION = re.compile(r'\[([^]]+)\]')
+SECTION = re.compile(r'\[([^]]+)\]\s*$')
 OPTION = re.compile(r'(\S+)\s*=\s*(.*)$')
 
 class Config:

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 27 11:45:15 2005

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.