Package svnmailer :: Package notifier :: Module _mail :: Class MailNotifier
[show private | hide private]
[frames | no frames]

Type MailNotifier

  object --+        
           |        
BaseNotifier --+    
               |    
    TextNotifier --+
                   |
                  MailNotifier

Known Subclasses:
MultiMailNotifier, TextMailNotifier

Bases class for mail (like) notifiers
Method Summary
  __init__(self, config, groupset, *args, **kwargs)
Initialization
unicode _getPathString(self, prefix, paths)
Returns the (possibly) prefixed paths as string
unicode _getPrefixedDirectories(self, changeset)
Returns the longest common directory prefix
unicode _getPrefixedFiles(self, changeset)
Returns the longest common path prefix
tuple composeHeaders(self, groups)
Compose the informational headers of the mail
tuple composeMail(self)
Composes the mail
dict getBasicHeaders(self)
Returns the basic headers
dict getCustomHeaders(self, groups)
Returns the custom headers
tuple getMailAddresses(self, groups)
Returns the substituted mail addresses (from/to/reply-to)
generator getMails(self)
Returns the composed mail(s)
unicode getMailSubject(self, countprefix)
Returns the subject
unicode getTransferEncoding(self)
Returns the transfer encoding to use
  run(self)
Send notification as mail
  sendMail(self, sender, to_addr, mail)
Sends the mail
  writeNotification(self)
Writes the whole diff notification body
    Inherited from TextNotifier
  _doWritePathList(self, cset)
Write the path list of a particular changeset
str getDate(self, oftime)
Returns the revision date in a human readable format
  writeContentDiff(self, change, raw)
Writes the content diff for a particular change
str writeContentDiffAction(self, change)
Writes the content diff action for a particular change
  writeDiff(self, token, name1, name2, value1, value2, isfile, rec1, rec2, time)
Writes a diff
  writeDiffList(self)
Writes the commit diffs
  writeLockData(self)
Writes the locking metadata
  writeMetaData(self)
Writes the commit metadata output
  writePathInfo(self, change)
Writes a short info about the kind of change
  writePathList(self)
Writes the commit path list
  writePropertyDiff(self, token, name, value1, value2, time, raw)
Writes a property diff
str writePropertyDiffAction(self, change, name, values, diff_tokens)
Writes the property diff action for a particular change
  writePropertyDiffs(self, diff_tokens, change, raw)
Writes the property diffs for a particular change
  writeRevPropData(self, raw)
Writes the revision property change data
    Inherited from BaseNotifier
str _getContentEncoding(self, path, revision)
Returns the encoding for the specified path and revision
tuple dumpContent(self, change, enc, default)
Dump the two revisions of a particular change
str getAuthor(self)
Returns the author of the revision
unicode getContentDiffAction(self, change)
Returns the content diff action for a particular change
str getContentDiffUrl(self, config, change)
Returns the content diff url for a particular change
str getContentEncodingProperty(self, path, revision)
Returns the content encoding property for a path/rev
tuple of str getContentEncodings(self, change, default)
Returns the encodings of the change content (base and current rev)
svnmailer.differ.* getDiffer(self, command)
Returns the initialized differ
tuple getDiffTokens(self, config)
Returns valid diff tokens and tests
str getEncodingFromMimeType(self, path, revision)
Returns the encoding extracted from svn:mime-type
str getLog(self)
Returns the log entry of the revision
unicode getPropertyDiffAction(self, values)
Returns the property diff action for a particular change
unicode or {str} getTempDir(self)
Returns the temporary directory
svnmailer.util.TempFile getTempFile(self)
Returns an open temporary file container object
int getTime(self)
Returns the time of the revision in seconds since epoch
str getUrl(self, config)
Returns the revision URL
bool isBinaryProperty(self, values)
Returns if the supplied property seems to be binary
bool isOneLineProperty(self, name, value)
Returns if the supplied property value takes just one line
bool isUTF8Property(self, name)
Returns if the supplied property name represents an UTF-8 property
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __repr__(x)
x.__repr__() <==> repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...
  __str__(x)
x.__str__() <==> str(x)...

Instance Variable Summary
sre pattern or None _header_re: Pattern for header name checking
    Inherited from TextNotifier
list changeset: The list of changes to process
svnmailer.settings.GroupSettingsContainer config: The group config
svnmailer.differ.* differ: The differ object
file like object fp: The file to write to
    Inherited from BaseNotifier
list _groupset: The groupset to process
dict _penc_cache: The (path, rev) -> property encoding cache
svnmailer.settings.Settings _settings: The settings to use

Class Variable Summary
list __implements__ = [<class 'svnmailer.notifier._text.TextN...
unicode COMMIT_SUBJECT = u'%(prefix)s r%(revision)s %(part)s - %...
unicode LOCK_SUBJECT = u'%(prefix)s %(files/dirs)s'
unicode REVPROP_SUBJECT = u'%(prefix)s r%(revision)s - %(propert...
unicode UNLOCK_SUBJECT = u'%(prefix)s %(files/dirs)s'
    Inherited from TextNotifier
str OUTPUT_SEPARATOR: the separator between headline and diff
str OUTPUT_SEPARATOR_LIGHT: the separator between headline and property diff
    Inherited from BaseNotifier
tuple _diffable_tests: Map generate_diffs list entrys to change methods
unicode ADD: "add" token
unicode COPY: "copy" token
unicode DELETE: "delete" token
str ENC_CONFIG: magic value, meaning that the content encoding should be retrieved from the config
str ENC_DEFAULT = 'show default encoding'
str ENC_PROPERTY: The property name, where encodings could be stored
unicode MODIFY: "modify" token
unicode NONE: "none" token
unicode PROPCHANGE: "propchange" token

Method Details

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

Initialization
Overrides:
svnmailer.notifier._text.TextNotifier.__init__

_getPathString(self, prefix, paths)

Returns the (possibly) prefixed paths as string

All parameters are expected to be UTF-8 encoded
Parameters:
prefix - The prefix (may be empty)
           (type=str)
paths - List of paths ([str, str, ...])
           (type=list)
Returns:
The prefixed paths as unicode
           (type=unicode)

_getPrefixedDirectories(self, changeset)

Returns the longest common directory prefix
Parameters:
changeset - The change set
           (type=list)
Returns:
The common dir and the path list, human readable
           (type=unicode)

_getPrefixedFiles(self, changeset)

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

composeHeaders(self, groups)

Compose the informational headers of the mail
Parameters:
groups - The groups to process
           (type=list)
Returns:
sender (unicode), recipients (list), headers (dict)
           (type=tuple)

composeMail(self)

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

getBasicHeaders(self)

Returns the basic headers
Returns:
The headers
           (type=dict)

getCustomHeaders(self, groups)

Returns the custom headers
Parameters:
groups - The groups to process
           (type=list)
Returns:
The custom headers
           (type=dict)

getMailAddresses(self, groups)

Returns the substituted mail addresses (from/to/reply-to)
Parameters:
groups - The groups to process
           (type=list)
Returns:
The address lists (sender, from, reply-to, to, to-fake, bcc)
           (type=tuple)

getMails(self)

Returns the composed mail(s)
Returns:
The mails
           (type=generator)

getMailSubject(self, countprefix=None)

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

getTransferEncoding(self)

Returns the transfer encoding to use
Returns:
The configured value
           (type=unicode)

run(self)

Send notification as mail
Overrides:
svnmailer.notifier._text.TextNotifier.run

sendMail(self, sender, to_addr, mail)

Sends the mail
Parameters:
sender - The mail sender (envelope from)
           (type=str)
to_addr - The receivers
           (type=list)
mail - The mail object
           (type=_TextMail)

writeNotification(self)

Writes the whole diff notification body

Instance Variable Details

_header_re

Pattern for header name checking
Type:
sre pattern or None

Class Variable Details

__implements__

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

COMMIT_SUBJECT

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

LOCK_SUBJECT

Type:
unicode
Value:
u'%(prefix)s %(files/dirs)s'                                           

REVPROP_SUBJECT

Type:
unicode
Value:
u'%(prefix)s r%(revision)s - %(property)s'                             

UNLOCK_SUBJECT

Type:
unicode
Value:
u'%(prefix)s %(files/dirs)s'                                           

Generated by Epydoc 2.1 on Mon Apr 17 12:39:11 2006 http://epydoc.sf.net