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

Re: [PATCH] Issue 3227 - adding some extra "custom" headers to the email

From: Jon Bendtsen <jbendtsen_at_laerdal.dk>
Date: Mon, 26 Jan 2009 14:02:46 +0100

Hi Greg (and others)

I have been thinking about how to split the path apart and how to
identify which parts of the path should actually be included into the
headers of the email. I came up with the idea of having 2
configuration variables.

Some examples:
Actual path = trunk/tools/hook-scripts/mailer/mailer.py
headers_path = branch/module/.../file
email_headers = author group module file
notice how the branch field is not included in the header.
module = tools
file = mailer.py

Actual path = trunk/tools/hook-scripts/mailer/mailer.py
headers_path = branch/module/.../directory/file
email_headers = author group module file directory branch
branch = trunk
module = tools
directory = mailer
file = mailer.py

the ... part signals that this part of the path should be ignored.
However, suppose we have a path definition like:

Actual path = trunk/tools/hook-scripts/mailer/mailer.py
headers_path = branch/module/submod/.../directory/subdir/file
branch = trunk
module = tools
submod = hook-scripts
file = mailer.py
subdir = mailer
directory = hookscripts

Notice how both directory and submod has the value hook-scripts

What i want to do is start parsing the path, and then i will parse the
headers_path and assign values until i reach ... or the end
After this i start from the back and assign values until i reach ...

You dont need to have ... in the path, but if you do have it, it can
not be both first and last. But you could write a path like this

headers_path = branch/module/submod/.../foobar/.../directory/subdir/file
then you can just never assign the foobar value.

The configuration parameter email_headers then actually determines
which of the values from the path should be included.

So, how do you like it?

JonB

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1054604
Received on 2009-01-26 14:48:35 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.