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

Re: [PATCH] minor change to mailer.py for subject formatting

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sat, 26 Jan 2013 22:03:01 +0200

Please attach patches as MIME text/plain (usually naming them *.txt does
that). More below.

> + if prefix and re.search(r'REPONAME', prefix):

Needlessly complicated, ('REPONAME' in prefix) would do.

Also I think you should use the %() syntax like mailer.conf.example
does. Is that possible?

> + reponame = os.path.basename(os.path.dirname(os.path.dirname(__file__)))

That's outright wrong. You can't assume that post-commit is a symlink
to mailer.py. (Just read post-commit.tmpl for a counterexample.)

> + prefix = re.sub(r'REPONAME', reponame, prefix)

(very brief review, and the setup I help maintain uses svnmailer not
mailer.py, so if the above doesn't make sense sorry and please correct me)
Received on 2013-01-26 21:03:37 CET

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.