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

Re: svn commit: rev 6483 - trunk/tools/cvs2svn

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-07-16 09:14:52 CEST

On Tue, Jul 15, 2003 at 07:59:22PM -0500, kfogel@tigris.org wrote:
>...
> +++ trunk/tools/cvs2svn/cvs2svn.py Tue Jul 15 19:59:20 2003
>...
> + # Officially, CVS symbolic names must use a fairly restricted set
> + # of characters. Unofficially, we don't care if some repositories
> + # out there don't abide by this, as long as their tags start with
> + # a letter and don't include '/' or '\' (both of which are
> + # prohibited by official restrictions anyway).
> + self.symbolic_name_re = re.compile('^[a-zA-Z][^/\\\\]*$')

That regular expression is constant, so I see no reason to keep compiling a
new regex object each time. Generally, I like to put these at the global
level, where they are compiled just once.

CHeers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 16 09:08:51 2003

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.