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

Type Patchlog

object --+
         |
        Patchlog


Log entry associated to a revision.

May be produced by `Revision.patchlog` or `ArchSourceTree.iter_logs()`. It
provides an extensive summary of the associated changeset, a natural
language description of the changes, and any number of user-defined
extension headers.

Patchlogs are formatted according to RFC-822, and are parsed using the
standard email-handling facilities.

Note that the patchlog text is not actually parsed before it is needed.
That deferred evaluation feature is implemented in the `_parse` method.

The fundamental accessors are `__getitem__`, which give the text of a named
patchlog header, and the `description` property which gives the text of the
patchlog body, that is anything after the headers.

Additional properties provide appropriate standard conversion of the
standard headers.

Method Summary
  __init__(self, revision, tree, fromlib)
Patchlog associated to the given revision.
  __getitem__(self, header)
Text of a patchlog header by name.
  __repr__(self)
  get_continuation(self)
Deprecated.
  get_creator(self)
Deprecated.
  get_date(self)
Deprecated.
  get_description(self)
Deprecated.
  get_merged_patches(self)
Deprecated.
  get_modified_files(self)
Deprecated.
  get_new_files(self)
Deprecated.
  get_new_patches(self)
Deprecated.
  get_removed_files(self)
Deprecated.
  get_renamed_files(self)
Deprecated.
  get_revision(self)
Deprecated.
  get_summary(self)
Deprecated.
  items(self)
List of 2-tuples containing all headers and values.
    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...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...
  __str__(x)
x.__str__() <==> str(x)...

Property Summary
  continuation: Deprecated.
  continuation_of: Ancestor of tag revisions.
  creator: User id of the the creator of the associated revision.
  date: Time of the associated revision.
  description: Patchlog body, a long natural language description.
  fromlib
  merged_patches: Revisions merged in this revision.
  modified_files: Names of source files modified in the associated revision.
  new_files: Source files added in the associated revision.
  new_patches: New-patches header as an iterable of Revision.
  removed_files: Names of source files removed in the associated revision.
  renamed_files: Source files renames in the associated revision.
  revision: Revision associated to this patchlog.
  summary: Patchlog summary, a one-line natural language description.
  tree

Method Details

__init__(self, revision, tree=None, fromlib=False)
(Constructor)

Patchlog associated to the given revision.

The patchlog may be retrieved from the provided ``tree``, from the
revision library if ``fromlib`` is set, or from the archive.

:param tree: source tree to retrieve the patchlog from.
:type tree: `ArchSourceTree`, None
:param fromlib: retrieve the patchlog from the revision library.
:type fromlib: bool
:raise ValueError: tree and fromlib are both set.
Overrides:
__builtin__.object.__init__

__getitem__(self, header)
(Indexing operator)

Text of a patchlog header by name.

:param header: name of a patchlog header.
:type header: str
:return: text of the header, or None if the header is not present.
:rtype: str, None

get_continuation(self)

Deprecated.

Ancestor of tag revisions.
None for commit and import revisions.

:rtype: `Revision`, None.
:see: `Patchlog.continuation_of`

get_creator(self)

Deprecated.

User id of the the creator of the associated revision.

:rtype: str
:see: `Patchlog.creator`

get_date(self)

Deprecated.

For the description of the local time tuple, see the
documentation of the `time` module.

:rtype: local time tuple
:see: `Patchlog.date`

get_description(self)

Deprecated.

Patchlog body, a long natural language description.

:rtype: str
:see: `Patchlog.description`

get_merged_patches(self)

Deprecated.

Revisions merged in this revision. That is the revisions
listed in the New-patches header except the revision of the
patchlog.

:rtype: iterable of `Revision`
:see: `Patchlog.merged_patches`

get_modified_files(self)

Deprecated.

Names of source files modified in the associated revision.

:rtype: iterable of `FileName`

get_new_files(self)

Deprecated.

Source files added in the associated revision.

:rtype: iterable of `FileName`
:see: `Patchlog.new_files`

get_new_patches(self)

Deprecated.

New-patches header as an iterable of Revision.

:rtype: iterable of `Revision`
:see: `Patchlog.new_patches`

get_removed_files(self)

Deprecated.

Names of source files removed in the associated revision.

:rtype: iterable of `FileName`

get_renamed_files(self)

Deprecated.

Source files renames in the associated revision.

Dictionnary whose keys are old names and whose values are the
corresponding new names. Explicit file ids are listed in
addition to their associated source file.

:rtype: dict

get_revision(self)

Deprecated.

Revision associated to this patchlog.

:rtype: `Revision`
:see: `Patchlog.revision`

get_summary(self)

Deprecated.

Patchlog summary, a one-line natural language description.

:rtype: str
:see: `Patchlog.summary`

items(self)

List of 2-tuples containing all headers and values.

:rtype: list of 2-tuple of str

Property Details

continuation

Deprecated.

Ancestor of tag revisions.
None for commit and import revisions.

:type: `Revision`, None.
:see: `Patchlog.continuation_of`

continuation_of

Ancestor of tag revisions.
None for commit and import revisions.

:type: `Revision`, None.

creator

User id of the the creator of the associated revision.

:type: str

date

Time of the associated revision.

For the description of the local time tuple, see the documentation
of the `time` module.

:type: local time tuple

description

Patchlog body, a long natural language description.

:type: str

merged_patches

Revisions merged in this revision.

That is the revisions listed in the New-patches header except the
revision of the patchlog.

:type: iterable of `Revision`

modified_files

Names of source files modified in the associated revision.

:type: iterable of `FileName`

new_files

Source files added in the associated revision.

:type: iterable of `FileName`

new_patches

New-patches header as an iterable of Revision.

Patchlogs added in this revision.

:type: iterable of `Revision`

removed_files

Names of source files removed in the associated revision.

:type: iterable of `FileName`

renamed_files

Source files renames in the associated revision.

Dictionnary whose keys are old names and whose values are the
corresponding new names. Explicit file ids are listed in
addition to their associated source file.

:type: dict

revision

Revision associated to this patchlog.

:type: `Revision`

summary

Patchlog summary, a one-line natural language description.

:type: str

Generated by Epydoc 2.1 on Thu Feb 2 14:21:53 2006 http://epydoc.sf.net