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

Re: [PATCH] svn2rss.py: Handle '--item-url' and '--feed-url' optionsand validate them

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2006-07-03 20:07:45 CEST

Bhuvaneswaran Arumugam wrote:
> Hello,
>
> Please find attached the patch!
>
> [[[
> Handle '--item-url' and '--feed-url' options and validate them
>

[...]

> +def match_url(url, opt):
> + """ match the url in url_res """
> +
> + match = 0
> + for url_re in url_res:
> + if(url_re.match(url)):
> + match = 1
> +
> + if(match == 0):
> + usage_and_exit("svn2rss.py: Invalid url '%s' is specified for \
> + '%s' option" % (url, opt))

No need for regular expressions here. A simple string.startswith() meets
your needs.

Committed (with this tweak, and some other small ones) in r20376.

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Mon Jul 3 20:08:14 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.