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

Type LogMessage

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.

Method Summary
  __init__(self, name)
  __getitem__(self, header)
Text of a patchlog header by name.
  __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__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...
  __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)...

Property Summary
  description
  name

Method Details

__getitem__(self, header)
(Indexing operator)

Text of a patchlog header by name.

__setitem__(self, header, text)
(Index assignment operator)

Set a patchlog header.

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.

get_description(self)

Body of the log message.

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.

Property Details

description

Get Method:
get_description(self)
Set Method:
set_description(self, s)

name

Get Method:
get_name(self)

Generated by Epydoc 2.1 on Tue Jul 11 07:23:51 2006 http://epydoc.sf.net