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

Re: svn stat on new files

From: Matt Kraai <kraai_at_alumni.cmu.edu>
Date: 2002-12-07 00:30:34 CET

On Fri, Dec 06, 2002 at 04:40:03PM -0600, Karl Fogel wrote:
> Matt Kraai <kraai@alumni.cmu.edu> writes:
> > Is the following test what you had in mind?
>
> That regexp
>
> > + for line in stat_output:
> > + if re.match(" +newfile", line):
> > + status = 0
>
> will match both "? newfile" and " newfile". Maybe you want
>
> re.match("^ +newfile", line):
>
> instead, or something like that?

I think using match implies a leading "^":

 If zero or more characters at the beginning of string match the
 regular expression pattern, return a corresponding MatchObject
 instance.[1]

Matt

1. http://www.python.org/doc/current/lib/node99.html#l2h-722

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 7 00:26:39 2002

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.