Package svnmailer :: Package notifier :: Module _text :: Class TextNotifier
[show private | hide private]
[frames | no frames]

Class TextNotifier

  object --+    
           |    
BaseNotifier --+
               |
              TextNotifier

Known Subclasses:
StdoutNotifier, TextMailNotifier

Base class for plain text notifications

The derived class must implement the run method, which should finally should call the writeNotification method.
Method Summary
  __init__(self, settings)
Initialization
str getDate(self)
Returns the revision date in a human readable format
  writeContentDiff(self, change)
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)
Writes a diff
  writeDiffList(self)
Writes the commit diffs
  writeMetaData(self)
Writes the commit metadata output
  writeNotification(self, fp, config, changeset)
Writes the whole diff notification body
  writePathInfo(self, change)
Writes a short info about the kind of change
  writePathList(self)
Writes the commit path list
str writePropertyDiffAction(self, change, name, values, diff_tokens)
Writes the property diff action for a particular change
  writePropertyDiffs(self, diff_tokens, change)
Writes the property diffs for a particular change
  writeRevPropData(self)
Writes the revisio property change data
    Inherited from BaseNotifier
tuple of svnmailer.util.TempFile dumpContent(self, change, enc)
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
svnmailer.differ.* getDiffer(self)
Returns the initialized differ
tuple getDiffTokens(self, config)
Returns valid diff tokens and tests
str getLog(self)
Returns the log entry of the revision
unicode getPropertyDiffAction(self, values)
Returns the property diff action for a particular change
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
  run(self, groupset)
Run the notifier
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __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)...
    Inherited from type
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...

Instance Variable Summary
list changeset: The list of changes to process
svnmailer.settings._GroupSettingsContainer config: The group config
file like object fp: The file to write to
    Inherited from BaseNotifier
svnmailer.settings.Settings _settings: The settings to use

Class Variable Summary
type __implements__ = svnmailer.notifier._base.BaseNotifier
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
unicode MODIFY: "modify" token
unicode NONE: "none" token
unicode PROPCHANGE: "propchange" token

Method Details

__init__(self, settings)
(Constructor)

Initialization
Overrides:
svnmailer.notifier._base.BaseNotifier.__init__

getDate(self)

Returns the revision date in a human readable format
Returns:
The date
           (type=str)

writeContentDiff(self, change)

Writes the content diff for a particular change
Parameters:
change - The particular change to process
           (type=

svnmailer.subversion._PathChangeDescriptor)

writeContentDiffAction(self, change)

Writes the content diff action for a particular change
Parameters:
change - The particular change to process
           (type=

svnmailer.subversion._PathChangeDescriptor)

Returns:
The diff token (maybe None)
           (type=str)

writeDiff(self, token, name1, name2, value1, value2, isfile=False)

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 - The diff token
           (type=unicode)
name1 - The (faked) first filename
           (type=str)
name2 - The (faked) second filename
           (type=str)
value1 - The first value
           (type=str)
value2 - The second value
           (type=str)
isfile - are the values file names?
           (type=bool)

writeDiffList(self)

Writes the commit diffs

writeMetaData(self)

Writes the commit metadata output

writeNotification(self, fp, config, changeset)

Writes the whole diff notification body
Parameters:
fp - The file to write to
           (type=file like object)
config - The group config
           (type=

svnmailer.settings._GroupSettingsContainer)

changeset - The list of changes to process
           (type=list)

writePathInfo(self, change)

Writes a short info about the kind of change
Parameters:
change - The change info
           (type=

svnmailer.subversion._PathChangeDescriptor)

writePathList(self)

Writes the commit path list

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

Writes the property diff action for a particular change
Parameters:
change - The particular change to process
           (type=

svnmailer.subversion._PathChangeDescriptor)

name - The property name
           (type=str)
values - The values of the property
           (type=tuple)
diff_tokens - Valid diff tokens
           (type=list)
Returns:
diff token that should be applied
           (type=str)

writePropertyDiffs(self, diff_tokens, change)

Writes the property diffs for a particular change
Parameters:
diff_tokens - The valid diff tokens
           (type=list)
change - The particular change to process
           (type=

svnmailer.subversion._PathChangeDescriptor)

writeRevPropData(self)

Writes the revisio property change data

Instance Variable Details

changeset

The list of changes to process
Type:
list
Value:
None                                                                  

config

The group config
Type:
svnmailer.settings._GroupSettingsContainer
Value:
None                                                                  

fp

The file to write to
Type:
file like object
Value:
None                                                                  

Class Variable Details

OUTPUT_SEPARATOR

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

OUTPUT_SEPARATOR_LIGHT

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

Generated by Epydoc 2.0 on Mon Feb 14 16:49:16 2005 http://epydoc.sf.net