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

Re: CVS update: subversion/subversion/tests/clients/cmdline svn_output.py xml_tests.py

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-04-17 00:47:15 CEST

On Mon, Apr 16, 2001 at 10:18:01PM -0000, sussman@tigris.org wrote:
>...
> +# General helper for compare_sets()
> +
> +# Useful regexp for checkout/update: r"^(..)\s+(.+)" ==> '_U /foo/bar'
> +# Useful regexp for commit/import: r"^(\w+)\s+(.+)" ==> "Changing /foo/bar'
> +# Useful regexp for status: r"^(..)\s+(\d+)\s+\(.+\)\s+(.+)"
> +# 'MM 13 ( 24) /foo/bar'
> +def line_matches_regexp(line, regexp):
> + "Return 0 if LINE matches REGEXP, or 1 if not."
>
> - # if we get here, then all groups matched.
> - return 0 # success
> + match = re.search(regexp, line)
> + if match is None:
> + return 1
> + else:
> + return 0

Maybe use re.match() ?

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:28 2006

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.