Package svnmailer :: Module main :: Class Main
[show private | hide private]
[frames | no frames]

Class Main

object --+
         |
        Main


Main svnmailer logic
Method Summary
  __init__(self, settings)
Initialization
Main fromCommandline(cls, background)
Initializes Main from command line arguments (Class method)
Main fromOptions(cls, options)
Initializes Main from an option container (Class method)
  run(self)
Dispatches the work to be done
  _closeRepository(self)
Closes the repository
list _getChanges(self)
Returns the list of changes for the requested revision
dict _getDefaultSubst(self, group, repos_path, path)
Returns the default substitution dict
list _getGroupsByChange(self, change)
Returns the matching groups for a particular change
list _getGroupSets(self)
Returns the list of groupsets (grouped groups...) to notify
svnmailer.notifier.selector.Selector _getNotifierSelector(self)
Returns the notifier selector
  _openRepository(self)
Opens the repository
    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
svnmailer.settings._base.BaseSettings _settings: The settings to use

Instance Method Details

__init__(self, settings)
(Constructor)

Initialization
Parameters:
settings - The settings to use
           (type=svnmailer.settings._base.BaseSettings)
Overrides:
__builtin__.object.__init__

run(self)

Dispatches the work to be done
Raises:
svnmailer.subversion.RepositoryError - Error while accessing the subversion repository
NotifierError - One or more notifiers went crazy

_closeRepository(self)

Closes the repository

_getChanges(self)

Returns the list of changes for the requested revision
Returns:
The list of changes ([Descriptor, ...])
           (type=list)
Raises:
svnmailer.subversion.Error - Error while accessing the subversion repository

_getDefaultSubst(self, group, repos_path, path)

Returns the default substitution dict
Parameters:
group - The group to consider
           (type=svnmailer.settings._base.GroupSettingsContainer)
repos_path - The repository path
           (type=unicode)
path - The change path
           (type=unicode)
Returns:
The initialized dictionary
           (type=dict)
Raises:
svnmailer.subversion.Error - An error occured while accessing the subversion repository

_getGroupsByChange(self, change)

Returns the matching groups for a particular change
Parameters:
change - The change to select
           (type=svnmailer.subversion.VersionedPathDescriptor)
Returns:
The group list
           (type=list)

_getGroupSets(self)

Returns the list of groupsets (grouped groups...) to notify
Returns:
The list (maybe empty). ([GroupSet, ...])
           (type=list)

_getNotifierSelector(self)

Returns the notifier selector
Returns:
The selector
           (type=svnmailer.notifier.selector.Selector)

_openRepository(self)

Opens the repository
Raises:
svnmailer.subversion.Error - Error while accessing the subversion repository

Class Method Details

fromCommandline(cls, background=True)

Initializes Main from command line arguments
Parameters:
background - May the process daemonize itself?
           (type=bool)
Returns:
A new Main instance
           (type=Main)
Raises:
CommandlineError - A command line error occured
ConfigurationError - A configuration error occured

fromOptions(cls, options)

Initializes Main from an option container
Parameters:
options - The options to consider
           (type=optparse.OptionContainer)
Returns:
A new Main instance
           (type=Main)
Raises:
ConfigError - A configuration error occured

Instance Variable Details

_settings

The settings to use
Type:
svnmailer.settings._base.BaseSettings

Generated by Epydoc 2.0 on Sun Sep 25 20:49:15 2005 http://epydoc.sf.net