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

Class Patchlog

source code

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.



Instance Methods
 
__getitem__(self, header)
Text of a patchlog header by name.
 
__init__(self, revision, tree=None, fromlib=False)
Patchlog associated to the given revision.
 
__repr__(self)
repr(x)
 
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__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties
  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

Inherited from object: __class__

Method Details

__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

__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: object.__init__

__repr__(self)
(Representation operator)

 
repr(x)

Overrides: object.__repr__
(inherited documentation)

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`

Get Method:
pybaz.Patchlog._get_continuation(self)

continuation_of


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

:type: `Revision`, None.

Get Method:
pybaz.Patchlog._get_continuation_of(self)

creator


User id of the the creator of the associated revision.

:type: str

Get Method:
pybaz.Patchlog._get_creator(self)

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

Get Method:
pybaz.Patchlog._get_date(self)

description


Patchlog body, a long natural language description.

:type: str

Get Method:
pybaz.Patchlog._get_description(self)

fromlib

Get Method:
unreachable.fromlib(self)

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`

Get Method:
pybaz.Patchlog._get_merged_patches(self)

modified_files


Names of source files modified in the associated revision.

:type: iterable of `FileName`

Get Method:
pybaz.Patchlog._get_modified_files(self)

new_files


Source files added in the associated revision.

:type: iterable of `FileName`

Get Method:
pybaz.Patchlog._get_new_files(self)

new_patches


New-patches header as an iterable of Revision.

Patchlogs added in this revision.

:type: iterable of `Revision`

Get Method:
pybaz.Patchlog._get_new_patches(self)

removed_files


Names of source files removed in the associated revision.

:type: iterable of `FileName`

Get Method:
pybaz.Patchlog._get_removed_files(self)

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

Get Method:
pybaz.Patchlog._get_renamed_files(self)

revision


Revision associated to this patchlog.

:type: `Revision`

Get Method:
pybaz.Patchlog._get_revision(self)

summary


Patchlog summary, a one-line natural language description.

:type: str

Get Method:
pybaz.Patchlog._get_summary(self)

tree

Get Method:
unreachable.tree(self)