Home | Trees | Index | Help |
|
---|
Package CedarBackup2 :: Package extend :: Module subversion :: Class LocalConfig |
|
object
--+
|
LocalConfig
Class representing this extension's configuration document.
This is not a general-purpose configuration object like the main Cedar Backup configuration object. Instead, it just knows how to parse and emit Subversion-specific configuration values. Third parties who need to read and write configuration related to this extension should access it through the constructor,validate
and addConfig
methods.
Note: Lists within this class are "unordered" for equality comparisons.
Method Summary | |
---|---|
Initializes a configuration object. | |
Official string representation for class instance. | |
Informal string representation for class instance. | |
Definition of equals operator for this class. | |
Validates configuration represented by the object. | |
Adds a <subversion> configuration section as the next child of a parent. | |
Adds a repository container as the next child of a parent. (Static method) | |
Property target used to get the subversion configuration value. | |
Reads a list of Repository objects from immediately
beneath the parent. (Static method)
| |
Parses a subversion configuration section. (Static method) | |
Internal method to parse an XML string into the object. | |
Property target used to set the subversion configuration value. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value |
Property Summary | |
---|---|
subversion : Subversion configuration in terms of a SubversionConfig
object. |
Instance Method Details |
---|
__init__(self,
xmlData=None,
xmlPath=None,
validate=True)
|
__repr__(self)
Official string representation for class instance.
|
__str__(self)
Informal string representation for class instance.
|
__cmp__(self,
other)
Definition of equals operator for this class. Lists within this
class are "unordered" for equality comparisons.
|
validate(self)Validates configuration represented by the object. Subversion configuration must be filled in. Within that, the collect mode and compress mode are both optional, but the list of repositories must contain at least one entry. Each BDB or FSFS repository must contain a repository path, and then must be either able to take collect mode and compress mode configuration from the parentSubversionConfig object, or
must set each value on its own. We don't look at any other kinds of
repositories that might be in the list.
|
addConfig(self, xmlDom, parentNode)Adds a <subversion> configuration section as the next child of a parent. Third parties should use this function to write configuration related to this extension. We add the following fields to the document:collectMode //cb_config/subversion/collectMode compressMode //cb_config/subversion/compressModeWe also add groups of the following items, one list element per item: repository //cb_config/subversion/repository
|
_getSubversion(self)Property target used to get the subversion configuration value. |
_parseXmlData(self, xmlData)Internal method to parse an XML string into the object. This method parses the XML document into a DOM tree (xmlDom ) and then calls a static method to parse the
subversion configuration section.
|
_setSubversion(self, value)Property target used to set the subversion configuration value. If notNone , the value must be a
SubversionConfig object.
|
Static Method Details |
---|
_addRepository(xmlDom, parentNode, repository)Adds a repository container as the next child of a parent. We add the following fields to the document:repositoryType repository/type repositoryPath repository/abs_path collectMode repository/collect_mode compressMode repository/compress_mode The <repository> node itself is created as the next child of
the parent node. This method only adds one repository node. The parent
must loop for each repository in the repository is None , this method call
will be a no-op.
|
_parseRepositories(parent)Reads a list of repositoryType type repositoryPath abs_path collectMode collect_mode compressMode compess_modeThe type field is optional, and if it isn't there we assume a BDB repositories. Note that we will currently ignore any repository listing which has a set type other than ["BDB",
"FSFS", ] . However, we will log a warning if we do
this.
|
_parseSubversion(parent)Parses a subversion configuration section. We read the following individual fields:collectMode //cb_config/subversion/collect_mode compressMode //cb_config/subversion/compress_modeWe also read groups of the following item, one list element per item: repositories //cb_config/subversion/repositoryThe repositories are parsed by _parseRepositories .
|
Property Details |
---|
subversionSubversion configuration in terms of aSubversionConfig
object.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Mon Sep 4 13:49:33 2006 | http://epydoc.sf.net |