Package svnmailer :: Package notifier :: Module _text :: Class TextNotifier
[hide private]

Class TextNotifier

source code

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

Base class for plain text notifications

The derived class must implement the run method.

Instance Methods [hide private]
 
__init__(self, settings, groupset)
Initialization
source code
 
_doWritePathList(self, cset)
Write the path list of a particular changeset
source code
str
getDate(self, oftime=None)
Returns the revision date in a human readable format
source code
 
run(self)
Runs the notifier (abstract method)
source code
 
writeContentDiff(self, change, raw=False)
Writes the content diff for a particular change
source code
str
writeContentDiffAction(self, change)
Writes the content diff action for a particular change
source code
 
writeDiff(self, token, name1, name2, value1, value2, isfile=False, rec1=None, rec2=None, time=None)
Writes a diff
source code
 
writeDiffList(self)
Writes the commit diffs
source code
 
writeLockData(self)
Writes the locking metadata
source code
 
writeMetaData(self)
Writes the commit metadata output
source code
 
writePathInfo(self, change)
Writes a short info about the kind of change
source code
 
writePathList(self)
Writes the commit path list
source code
 
writePropertyDiff(self, token, name, value1, value2, time=None, raw=False)
Writes a property diff
source code
str
writePropertyDiffAction(self, change, name, values, diff_tokens)
Writes the property diff action for a particular change
source code
 
writePropertyDiffs(self, diff_tokens, change, raw=False)
Writes the property diffs for a particular change
source code
 
writeRevPropData(self, raw=False)
Writes the revision property change data
source code

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]
str OUTPUT_SEPARATOR = '==========================================...
the separator between headline and diff
str OUTPUT_SEPARATOR_LIGHT = '------------------------------------...
the separator between headline and property diff
  __implements__ = [<class 'svnmailer.notifier._base.BaseNotifie...

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]
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 = None
The file to write to

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, settings, groupset)
(Constructor)

source code 

Initialization

Overrides: object.__init__

_doWritePathList(self, cset)

source code 

Write the path list of a particular changeset

Parameters:
  • cset (list) - The changeset to process

getDate(self, oftime=None)

source code 

Returns the revision date in a human readable format

Returns: str
The date

run(self)

source code 

Runs the notifier (abstract method)

Overrides: _base.BaseNotifier.run

writeContentDiff(self, change, raw=False)

source code 

Writes the content diff for a particular change

Parameters:
  • change (svnmailer.subversion.VersioendPathDescriptor) - The particular change to process
  • raw (bool) - Prefer no recoding?

writeContentDiffAction(self, change)

source code 

Writes the content diff action for a particular change

Parameters:
  • change (svnmailer.subversion.VersionedPathDescriptor) - The particular change to process
Returns: str
The diff token (maybe None)

writeDiff(self, token, name1, name2, value1, value2, isfile=False, rec1=None, rec2=None, time=None)

source code 

Writes a diff

By default value1 and value2 are strings to diff, but if isfile is set and True, these are treated as names of files to diff.

Parameters:
  • token (unicode) - The diff token
  • name1 (str) - The (faked) first filename
  • name2 (str) - The (faked) second filename
  • value1 (str) - The first value
  • value2 (str) - The second value
  • isfile (bool) - are the values file names?

writePathInfo(self, change)

source code 

Writes a short info about the kind of change

Parameters:
  • change (svnmailer.subversion.VersionedPathDescriptor) - The change info

writePropertyDiff(self, token, name, value1, value2, time=None, raw=False)

source code 

Writes a property diff

Parameters:
  • token (unicode) - The diff token
  • name (str) - The name of the property
  • value1 (str) - The raw old value
  • value2 (str) - The raw new value
  • time (int) - Time to display in the diff description in seconds since epoch
  • raw (bool) - Don't recode the properties?

writePropertyDiffAction(self, change, name, values, diff_tokens)

source code 

Writes the property diff action for a particular change

Parameters:
  • change (svnmailer.subversion.VersionedPathDescriptor) - The particular change to process
  • name (str) - The property name
  • values (tuple) - The values of the property
  • diff_tokens (list) - Valid diff tokens
Returns: str
diff token that should be applied

writePropertyDiffs(self, diff_tokens, change, raw=False)

source code 

Writes the property diffs for a particular change

Parameters:
  • diff_tokens (list) - The valid diff tokens
  • change (svnmailer.subversion.VersionedPathDescriptor) - The particular change to process
  • raw (bool) - Don't recode the properties?

writeRevPropData(self, raw=False)

source code 

Writes the revision property change data

Parameters:
  • raw (bool) - Don't recode the property?

Class Variable Details [hide private]

OUTPUT_SEPARATOR

the separator between headline and diff
Type:
str
Value:
'''===================================================================\
===========
'''

OUTPUT_SEPARATOR_LIGHT

the separator between headline and property diff
Type:
str
Value:
'''-------------------------------------------------------------------\
-----------
'''

__implements__

Value:
[<class 'svnmailer.notifier._base.BaseNotifier'>]