Package pybaz :: Class LogMessage
[frames] | no frames]

Class LogMessage

source code

object --+
         |
        LogMessage

Log message for use with commit, import or tag operations.

This is the write-enabled counterpart of Patchlog. When creating a new
revision with import, commit or tag, a log message file can be used to
specify a long description and custom headers.

Commit and import can use the default log file of the source tree, with a
special name. You can create the LogMessage object associated to the
default log file with the WorkingTree.log_message method.

For integration with external tools, it is useful to be able to parse an
existing log file and write the parsed object back idempotently. We are
lucky since this idempotence is provided by the standard email.Parser and
email.Generator.



Instance Methods
 
__getitem__(self, header)
Text of a patchlog header by name.
 
__init__(self, name)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__setitem__(self, header, text)
Set a patchlog header.
 
clear(self)
Clear the in-memory log message.
 
get_description(self)
Body of the log message.
 
get_name(self)
 
load(self)
Read the log message from disk.
 
save(self)
Write the log message to disk.
 
set_description(self, s)
Set the body of the log message.

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties
  description
Body of the log message.
  name

Inherited from object: __class__

Method Details

__init__(self, name)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

clear(self)

 
Clear the in-memory log message.

When creating a new log message file, this method must be used
first before setting the message parts. That should help early
detection of erroneous log file names.


Property Details

description

Body of the log message.

Get Method:
pybaz.LogMessage.get_description(self) - Body of the log message.
Set Method:
pybaz.LogMessage.set_description(self, s) - Set the body of the log message.

name

Get Method:
pybaz.LogMessage.get_name(self)