Package pybaz
[frames | no frames]

Package pybaz

High level bindings for the Arch revision control system

Archive Namespace Class Hierarchy
---------------------------------

:group Namespace Classes: ArchiveLocation, Archive, Category, Branch, Version,
    Revision

:group Abstract Namespace Classes: NamespaceObject, Setupable, Package,
    CategoryIterable, BranchIterable, VersionIterable, RevisionIterable,
    ArchiveItem, CategoryItem, BranchItem, VersionItem

:group Archive-Related Classes: RevisionFile, NameParser

The `Archive`, `Category`, `Branch`, `Version` and `Revision` classes
model the Arch namespace. Namespace objects can be created without the
corresponding archive structure being available.

Since they form a hierarchy of containers with shared methods and
properties in both directions, but do not have any subclass
relationship, they are defined using a collection of mixin classes.

The `RevisionIterable`, `VersionIterable`, `BranchIterable` and
`CategoryIterable` classes define the features which are inherited by
enclosing archive containers. Many methods in that hierarchy are
defined abstract (they raise UnimplementedError). They are always
overriden and are required to prevent legitimate PyChecker warnings.

The `ArchiveItem`, `CategoryItem`, `BranchItem` and `VersionItem`
classes provides features which are inherited by enclosed archive
items. The `NamespaceObject`, `Setupable` and `Package` classes
provide miscellaneous features and define aspects which do not fit
within the rest of the hierarchy.

:group Source Tree Classes: SourceTree, ForeignTree, ArchSourceTree,
    LibraryTree, WorkingTree

:group Changeset and Log Classes: Changeset, Patchlog, LogMessage

:group Incremental Ouput: ChangesetCreation, ChangesetApplication,
    Chatter, TreeChange, FileAddition, FileDeletion, FileModification,
    FilePermissionsChange, FileRename, SymlinkModification,
    MergeOutcome, PatchConflict

:group Archive Functions: archives, iter_archives, make_archive,
    register_archive, get, get_patch, make_continuation

:group Source Tree Functions: init_tree, in_source_tree, tree_root

:group User Functions: default_archive, my_id, set_my_id

:group Changeset Generation Functions: changeset, delta, iter_delta

:group Pika Escaping Functions: name_escape, name_unescape

:group Revision Library Functions: register_revision_library,
    unregister_revision_library, iter_revision_libraries, library_archives,
    iter_library_archives

:group Incremental Output Functions: classify_chatter,
    classify_changeset_creation, classify_changeset_application

:group Obsolete Utility Functions: filter_archive_logs, filter_revisions,
    grep_summary, grep_summary_interactive, last_revision, map_name_id,
    revision_which_created, revisions_merging, suspected_move, temphack

:var backend: Backend controller.

    This object is used to configure the backend system: name of the
    executable, process handling strategy and command-line logging.

:type backend: `backends.commandline.CommandLineBackend`

Submodules
  • backends: Backend control.
    • baz: Construction of tla commands...
    • commandline: Command-line back-end glue.
    • forkexec: PyArch specific process spawning...
    • logger: Command line logging...
  • compat: Utilities for handling compatibility with multiple versions.
  • errors: PyArch exceptions...
  • pathname: File name manipulation.
  • util: Obsolete utility module...

Classes
Archive Arch archive namespace object.
ArchiveItem Base class for all archive components classes.
ArchiveLocation A location identified by an url and containing a Bazaar archive.
ArchiveLocationParams Parameter Object used for creating archives masters and mirrors.
ArchSourceTree Abstract base class for Arch source trees.
Branch Arch branch namespace object.
BranchItem Base class for archive classes Version and Revision.
BranchIterable Base class for archive classes above Branch.
Category Arch category namespace object.
CategoryItem Base class for archive classes below Category.
CategoryIterable Base class for Archive.
Changeset Arch whole-tree changeset.
ChangesetApplication Incremental changeset application process.
ChangesetCreation Incremental changeset generation process.
Chatter Chatter lines in ``tla`` output.
Factory Abstract factory for objects created by the public interface.
FileAddition Changeset summary line for a new file.
FileDeletion Changeset summary line for a deleted file.
FileModification Changeset summary line for file whose contents were modified.
FilePermissionsChange Changeset summary line for a change in permissions.
FileRename Changeset summary line for a renaming.
ForeignTree Generic source tree without Arch support.
LibraryTree Read-only Arch source tree.
LogMessage Log message for use with commit, import or tag operations.
MergeOutcome Abstract base class for changeset application summary output lines.
NameParser Parser for names in Arch archive namespace.
NamespaceObject Base class for all archive objects.
Package Base class for ordered container archive objects.
PatchConflict Changeset application summary line for a patch conflict.
Patchlog Log entry associated to a revision.
Revision Arch revision namespace object.
RevisionFile File component of an archived revision.
RevisionIterable Abstract class for namespace classes above Revision.
Setupable Base class for container archive objects.
SourceTree Abstract base class for `ForeignTree` and `ArchSourceTree`.
SymlinkModification Changeset summary line for a symlink modification.
TreeChange Abstract base class for ``changes`` summary output lines.
Version Arch version namespace object.
VersionItem Base class for Revision.
VersionIterable Abstract class for archive classes above Version.
WorkingTree Working source tree, Arch source tree which can be modified.

Function Summary
  archives()
Deprecated.
  changeset(orig, mod, dest)
Deprecated.
  classify_changeset_application(lines)
Classify the output of a change-producing command.
  classify_changeset_creation(lines, pad)
Classify the output of a changeset creation command.
  classify_chatter(iter)
Classify chatter in a sequence of strings.
  default_archive()
Default Archive object or None.
  delta(orig, mod, dest)
Compute a whole-tree changeset.
  filter_archive_logs(limit, pred)
  filter_revisions(limit, pred)
  get(revision, dir, link)
Construct a project tree for a revision.
  get_patch(revision, dir)
Deprecated.
  grep_summary(limit, rx)
  grep_summary_interactive(limit)
  in_source_tree(directory)
Is directory inside a Arch source tree? :param directory: test if that directory is in an Arch source tree.
  init_tree(directory, version, nested)
Initialize a new project tree.
  iter_archives()
Iterate over registered archives.
  iter_delta(orig, mod, dest)
Compute a whole-tree changeset with incremental output.
  iter_library_archives()
Iterate over archives present in the revision library.
  iter_revision_libraries()
Iterate over registered revision library directories.
  last_revision(tree)
  library_archives()
Deprecated.
  make_archive(name, location, signed, listing, tla)
Deprecated.
  make_continuation(source_revision, tag_version)
Deprecated.
  map_name_id(tree)
  my_id()
The current registered user id :return: the user id, for example 'John Doe <jdoe@example.org>'.
  name_escape(name)
Escape a file name using the Arch syntax.
  name_unescape(name)
Unescape a file name using the Arch syntax.
  register_archive(name, location)
Deprecated.
  register_revision_library(dirname)
Register an existing revision library directory.
  revision_which_created(file, revision)
  revisions_merging(limit, rev)
  set_my_id(new_id)
Set the current registered user id :param new_id: new value of the user id.
  suspected_move(limit)
  temphack(revision)
  tree_root(directory)
SourceTree containing the given directory.
  unregister_revision_library(dirname)
Unregister a revision library directory.

Function Details

archives()

Deprecated.

List of registered archives.

:rtype: sequence of `Archive`
:see: `iter_archives`

changeset(orig, mod, dest)

Deprecated.

:see: `delta`
:rtype: `Changeset`

classify_changeset_application(lines)

Classify the output of a change-producing command.

:param lines: incremental output from a changeset application command.
:type lines: iterable of str
:rtype: iterable of `Chatter`, `MergeOutcome`, str

:note: diff output (*e.g.* ``changes --diffs``) is not supported.

classify_changeset_creation(lines, pad=' ')

Classify the output of a changeset creation command.

:param lines: incremental output from a changeset creation command.
:type lines: iterator of str
:param pad: padding text between prefix and file name.
:type pad: str
:rtype: Iterable of `Chatter`, `TreeChange`, str

:note: diff output (*e.g.* ``changes --diffs``) is not supported.

classify_chatter(iter)

Classify chatter in a sequence of strings.

Generator that yields Chatter objects for chatter lines, and
yields other lines verbatim.

:param iter: iterable of str
:rtype: iterable of `Chatter` or str

default_archive()

Default Archive object or None.

:return: the default archive, or None.
:rtype: `Archive`, None

delta(orig, mod, dest)

Compute a whole-tree changeset.

Create the output directory ``dest`` (it must not already exist).

Compare the source trees ``orig`` and ``mod`` (which may be source
arch source tree or revisions). Create a changeset in ``dest``.

:param orig: the old revision or directory.
:type orig: `Revision`, `ArchSourceTree`
:param mod: the new revision or directory.
:type mod: `Revision`, `ArchSourceTree`
:param dest: path of the changeset to create.
:type dest: str
:return: changeset from ``orig`` to ``mod``.
:rtype: `Changeset`

get(revision, dir, link=False)

Construct a project tree for a revision.

:rtype: `WorkingTree`
:see: `Revision.get`

get_patch(revision, dir)

Deprecated.

:rtype: `Changeset`
:see: `Revision.get_patch`

in_source_tree(directory=None)

Is directory inside a Arch source tree?

:param directory: test if that directory is in an Arch source tree.
:type directory: str
:return: whether this directory is inside an Arch source tree.
:rtype: bool

:warning: omitting the ``directory`` argument is deprecated.

init_tree(directory, version=None, nested=False)

Initialize a new project tree.

:param directory: directory to initialize as a source tree.
:type directory: str
:param version: if given, set the the ``tree-version`` and create an empty
   log version.
:type version: `Version`
:param nested: if true, the command will succeed even if 'directory'
    is already within a source tree.
:type nested: bool
:return: source tree object for the given directory.
:rtype: `WorkingTree`

iter_archives()

Iterate over registered archives.

:return: all registered archives.
:rtype: iterable of `Archive`

iter_delta(orig, mod, dest)

Compute a whole-tree changeset with incremental output.

:param orig: old revision or directory.
:type orig: `Revision`, `ArchSourceTree`
:param mod: new revision or directory,
:type mod: `Revision`, `ArchSourceTree`
:param dest: path of the changeset to create.
:type dest: str
:rtype: `ChangesetCreation`

iter_library_archives()

Iterate over archives present in the revision library.

:returns: all archives which are present in the revision library.
:rtype: iterable of `Archive`

iter_revision_libraries()

Iterate over registered revision library directories.

:return: directory names of all registered revision libraries.
:rtype: iterable of str

library_archives()

Deprecated.

List of archives present in the revision library.

:rtype: sequence of `Archive`
:see: `iter_library_archives`

make_archive(name, location, signed=False, listing=False, tla=False)

Deprecated.

:see: `ArchiveLocation.create_master`

:param name: archive name (e.g. "david@allouche.net--2003b").
:type name: `Archive` or str
:param location: URL of the archive
:type location: str
:param signed: create GPG signatures for the archive contents.
:type signed: bool
:param listing: maintains ''.listing'' files to enable HTTP access.
:type listing: bool
:param tla: create a tla archive instead of a baz archive.
:type tla: bool

:return: an `Archive` instance for the given name.
:rtype: `Archive`

:raise errors.NamespaceError: ``name`` is not a valid archive name.

make_continuation(source_revision, tag_version)

Deprecated.

:see: `Revision.make_continuation`

my_id()

The current registered user id

:return: the user id, for example 'John Doe <jdoe@example.org>'.
:rtype: str

name_escape(name)

Escape a file name using the Arch syntax.

:arg name: unescaped file name.
:type name: str
:return: escaped file name.
:rtype: str

name_unescape(name)

Unescape a file name using the Arch syntax.

:arg name: escaped file name.
:type name: str
:return: unescaped file name.
:rtype: str
:raise errors.IllegalEscapeSequence: the syntax of ``name`` is incorrect.

register_archive(name, location)

Deprecated.

:see: `ArchiveLocation.register`

:param name: archive name, or None to use the official name stored in the
    archive.
:type name: str, None
:param location: URL of the archive.
:type location: str
:return: newly registered archive.
:rtype: `Archive`.

register_revision_library(dirname)

Register an existing revision library directory.

:param dirname: absolute path name of existing user-writable directory.
:type dirname: str
:todo: create_revision_library which abstracts out revlib construction.
:postcondition: ``dirname`` is present in `iter_revision_libraries` output.

set_my_id(new_id)

Set the current registered user id

:param new_id: new value of the user id.
:type new_id: str

tree_root(directory=None)

SourceTree containing the given directory.

:param directory: give the ``tree-root`` of this directory. Specify "." to
    get the ``tree-root`` of the current directory.
:type directory: str
:return: source tree containing ``directory``.
:rtype: `ArchSourceTree`

:warning: omitting the ``directory`` argument is deprecated.

unregister_revision_library(dirname)

Unregister a revision library directory.

:param dirname: registered revision library directory.
:type dirname: str
:todo: delete_revision_library which abstracts out revlib destruction.
:precondition: ``dirname`` is present in `iter_revision_libraries` output.
:postcondition: ``dirname`` is not listed by `iter_revision_libraries`.

Generated by Epydoc 2.1 on Tue Jul 18 16:30:57 2006 http://epydoc.sf.net