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

Re: [PATCH] option mapping in mailer.py

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2006-05-30 16:02:40 CEST

Mathias Weinert wrote:
> C. Michael Pilato wrote:
>
>>Mathias Weinert wrote:
>>
>>>Hi there,
>>>
>>>I am still hoping that some will commit the following patch to mailer.py
>>>so please let my wishes get true...
>>>
>>>This patch adds a new parameter to the configuration file which allows
>>>to use different characters for splitting the to_addr.
>>>
>>>This is usefull for using additional name information in the mail
>>>addresses. Example:
>>>
>>> to_addr_split_char = ,
>>> to_addr = "The great Wallace" <wallace@atanyaddress>, "little Grommit" <grommit@propablyatthesameaddress>
>>
>>I find this two-option setup silly. Just make the code smart enough to know
>>that email records are comma-delimited, and any commas in the quoted regions
>>don't count towards that splitting. I whipped up the following helper
>>function for performing such a split, but I'm sure there's probably a
>>slicker/quicker way to do it:
>>
>
>
> I wonder if such a function is needed at all. For me it would be enough
> to use the comma instead of whitespaces. But that may result in problems
> for people updating to this version (which will BTW be the same with your
> proposal).

Hrm. I forgot that the existing code splits on whitespace. Bummer.

> What do you think about keeping it very simple and just changing the
> split char from whitespace to comma?

Honestly, that's fine by me. I just figured folks would get tripped up when
they copy addresses from their address books like:

   "Weinert, Mathias" <mathias.weinert@someplace.oroth.er>

So, if we want cheap compability without an ugly wart like
"to_addr_split_char", we can do this:

   * add a new 'to_addrs' (or 'to_addresses') option that has
     whatever splitting rules we want
   * deprecate the 'to_addr' option
   * for kicks, stick an X-Subversion-Mailer-Warning: header in mails
     that are generated by instances that still use 'to_addr' :-)
     generated by mailer.py

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

Received on Tue May 30 16:04:31 2006

This is an archived mail posted to the Subversion Dev mailing list.