Package svnmailer :: Package notifier :: Module _mail :: Class MailNotifier
[hide private]

Class MailNotifier

source code

        object --+        
                 |        
_base.BaseNotifier --+    
                     |    
    _text.TextNotifier --+
                         |
                        MailNotifier
Known Subclasses:

Bases class for mail (like) notifiers

Instance Methods [hide private]
 
__init__(self, config, groupset, *args, **kwargs)
Initialization
source code
unicode
_getPathString(self, prefix, paths)
Returns the (possibly) prefixed paths as string
source code
unicode
_getPrefixedDirectories(self, changeset)
Returns the longest common directory prefix
source code
unicode
_getPrefixedFiles(self, changeset)
Returns the longest common path prefix
source code
tuple
composeHeaders(self, groups)
Compose the informational headers of the mail
source code
tuple
composeMail(self)
Composes the mail
source code
dict
getBasicHeaders(self)
Returns the basic headers
source code
dict
getCustomHeaders(self, groups)
Returns the custom headers
source code
tuple
getMailAddresses(self, groups)
Returns the substituted mail addresses (from/to/reply-to)
source code
unicode
getMailSubject(self, countprefix=None)
Returns the subject
source code
generator
getMails(self)
Returns the composed mail(s)
source code
unicode
getTransferEncoding(self)
Returns the transfer encoding to use
source code
 
run(self)
Send notification as mail
source code
 
sendMail(self, sender, to_addr, mail)
Sends the mail
source code
 
writeNotification(self)
Writes the whole diff notification body
source code

Inherited from _text.TextNotifier: getDate, writeContentDiff, writeContentDiffAction, writeDiff, writeDiffList, writeLockData, writeMetaData, writePathInfo, writePathList, writePropertyDiff, writePropertyDiffAction, writePropertyDiffs, writeRevPropData

Inherited from _text.TextNotifier (private): _doWritePathList

Inherited from _base.BaseNotifier: dumpContent, getAuthor, getContentDiffAction, getContentDiffUrl, getContentEncodingProperty, getContentEncodings, getDiffTokens, getDiffer, getEncodingFromMimeType, getLog, getPropertyDiffAction, getTempDir, getTempFile, getTime, getUrl, isBinaryProperty, isOneLineProperty, isUTF8Property

Inherited from _base.BaseNotifier (private): _getContentEncoding

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  COMMIT_SUBJECT = u'%(prefix)s r%(revision)s %(part)s - %(files...
  LOCK_SUBJECT = u'%(prefix)s %(files/dirs)s'
  REVPROP_SUBJECT = u'%(prefix)s r%(revision)s - %(property)s'
  UNLOCK_SUBJECT = u'%(prefix)s %(files/dirs)s'
  __implements__ = [<class 'svnmailer.notifier._text.TextNotifie...

Inherited from _text.TextNotifier: OUTPUT_SEPARATOR, OUTPUT_SEPARATOR_LIGHT

Inherited from _base.BaseNotifier: ADD, COPY, DELETE, ENC_CONFIG, ENC_DEFAULT, ENC_PROPERTY, MODIFY, NONE, PROPCHANGE

Inherited from _base.BaseNotifier (private): _diffable_tests

Instance Variables [hide private]
sre pattern or None _header_re
Pattern for header name checking

Inherited from _text.TextNotifier: changeset, config, differ, fp

Inherited from _base.BaseNotifier (private): _groupset, _penc_cache, _settings

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, config, groupset, *args, **kwargs)
(Constructor)

source code 

Initialization

Overrides: object.__init__

_getPathString(self, prefix, paths)

source code 

Returns the (possibly) prefixed paths as string

All parameters are expected to be UTF-8 encoded

Parameters:
  • prefix (str) - The prefix (may be empty)
  • paths (list) - List of paths ([str, str, ...])
Returns: unicode
The prefixed paths as unicode

_getPrefixedDirectories(self, changeset)

source code 

Returns the longest common directory prefix

Parameters:
  • changeset (list) - The change set
Returns: unicode
The common dir and the path list, human readable

_getPrefixedFiles(self, changeset)

source code 

Returns the longest common path prefix

Parameters:
  • changeset (list) - The change set
Returns: unicode
The common dir and the path list, human readable

composeHeaders(self, groups)

source code 

Compose the informational headers of the mail

Parameters:
  • groups (list) - The groups to process
Returns: tuple
sender (unicode), recipients (list), headers (dict)

composeMail(self)

source code 

Composes the mail

Returns: tuple
The senders, the receivers, the mail(s)

getBasicHeaders(self)

source code 

Returns the basic headers

Returns: dict
The headers

getCustomHeaders(self, groups)

source code 

Returns the custom headers

Parameters:
  • groups (list) - The groups to process
Returns: dict
The custom headers

getMailAddresses(self, groups)

source code 

Returns the substituted mail addresses (from/to/reply-to)

Parameters:
  • groups (list) - The groups to process
Returns: tuple
The address lists (sender, from, reply-to, to, to-fake, bcc)

getMailSubject(self, countprefix=None)

source code 

Returns the subject

Parameters:
  • countprefix (unicode) - Optional countprefix (inserted after the rev number)
Returns: unicode
The subject line

getMails(self)

source code 

Returns the composed mail(s)

Returns: generator
The mails

getTransferEncoding(self)

source code 

Returns the transfer encoding to use

Returns: unicode
The configured value

run(self)

source code 

Send notification as mail

Overrides: _base.BaseNotifier.run

sendMail(self, sender, to_addr, mail)

source code 

Sends the mail

Parameters:
  • sender (str) - The mail sender (envelope from)
  • to_addr (list) - The receivers
  • mail (_TextMail) - The mail object

Class Variable Details [hide private]

COMMIT_SUBJECT

Value:
u'%(prefix)s r%(revision)s %(part)s - %(files/dirs)s'

__implements__

Value:
[<class 'svnmailer.notifier._text.TextNotifier'>]