Package pybaz :: Module _builtin
[frames] | no frames]

Module _builtin

source code


Internal module providing top-level pybaz package names

This module implements the top-level public interface for the
pybaz_ package. But for convenience reasons the author prefers
to store this code in a file separate from ``__init__.py``.

.. _pybaz: pybaz-module.html

This module is strictly internal and should never be used.

:var backend: See `pybaz.backend`

:var _arch: Internal deprecated interface to the backend



Classes
  ArchiveLocationParams
Parameter Object used for creating archives masters and mirrors.
  ArchiveLocation
A location identified by an url and containing a Bazaar archive.
  Factory
Abstract factory for objects created by the public interface.
  NamespaceObject
Base class for all archive objects.
  RevisionIterable
Abstract class for namespace classes above Revision.
  VersionIterable
Abstract class for archive classes above Version.
  BranchIterable
Base class for archive classes above Branch.
  CategoryIterable
Base class for Archive.
  ArchiveItem
Base class for all archive components classes.
  CategoryItem
Base class for archive classes below Category.
  BranchItem
Base class for archive classes Version and Revision.
  VersionItem
Base class for Revision.
  Setupable
Base class for container archive objects.
  Package
Base class for ordered container archive objects.
  Archive
Arch archive namespace object.
  Category
Arch category namespace object.
  Branch
Arch branch namespace object.
  Version
Arch version namespace object.
  Revision
Arch revision namespace object.
  RevisionFile
File component of an archived revision.
  Patchlog
Log entry associated to a revision.
  LogMessage
Log message for use with commit, import or tag operations.
  SourceTree
Abstract base class for `ForeignTree` and `ArchSourceTree`.
  ForeignTree
Generic source tree without Arch support.
  ArchSourceTree
Abstract base class for Arch source trees.
  LibraryTree
Read-only Arch source tree.
  WorkingTree
Working source tree, Arch source tree which can be modified.
  Changeset
Arch whole-tree changeset.
  ChangesetApplication
Incremental changeset application process.
  ChangesetCreation
Incremental changeset generation process.
  NameParser
Parser for names in Arch archive namespace.
  Chatter
Chatter lines in ``tla`` output.
  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.
  MergeOutcome
Abstract base class for changeset application summary output lines.
  PatchConflict
Changeset application summary line for a patch conflict.
  SymlinkModification
Changeset summary line for a symlink modification.
  TreeChange
Abstract base class for ``changes`` summary output lines.
Functions
 
name_unescape(name)
Unescape a file name using the Arch syntax.
 
name_escape(name)
Escape a file name using the Arch syntax.
 
init_tree(directory, version=None, nested=False)
Initialize a new project tree.
 
in_source_tree(directory=None)
Is directory inside a Arch source tree? :param directory: test if that directory is in an Arch source tree.
 
tree_root(directory=None)
SourceTree containing the given directory.
 
iter_delta(orig, mod, dest)
Compute a whole-tree changeset with incremental output.
 
delta(orig, mod, dest)
Compute a whole-tree changeset.
 
changeset(orig, mod, dest)
Deprecated.
 
my_id()
The current registered user id :return: the user id, for example 'John Doe <jdoe@example.org>'.
 
set_my_id(new_id)
Set the current registered user id :param new_id: new value of the user id.
 
make_archive(name, location, signed=False, listing=False, tla=False)
Deprecated.
 
register_archive(name, location)
Deprecated.
 
iter_archives()
Iterate over registered archives.
 
archives()
Deprecated.
 
iter_library_archives()
Iterate over archives present in the revision library.
 
library_archives()
Deprecated.
 
default_archive()
Default Archive object or None.
 
make_continuation(source_revision, tag_version)
Deprecated.
 
get(revision, dir, link=False)
Construct a project tree for a revision.
 
get_patch(revision, dir)
Deprecated.
 
iter_revision_libraries()
Iterate over registered revision library directories.
 
register_revision_library(dirname)
Register an existing revision library directory.
 
unregister_revision_library(dirname)
Unregister a revision library directory.
 
map_name_id(tree)
 
grep_summary(limit, rx)
 
grep_summary_interactive(limit)
 
filter_archive_logs(limit, pred)
 
temphack(revision)
 
last_revision(tree)
 
revision_which_created(file, revision)
 
revisions_merging(limit, rev)
 
filter_revisions(limit, pred)
 
suspected_move(limit)
 
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.
Variables
  backend = <pybaz.backends.commandline.CommandLineBackend objec...
  factory = Factory()
Function Details

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.

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

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`

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.

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.

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`

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`

changeset(orig, mod, dest)

 
Deprecated.

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

my_id()

 
The current registered user id

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

set_my_id(new_id)

 
Set the current registered user id

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

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.

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`.

iter_archives()

 
Iterate over registered archives.

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

archives()

 
Deprecated.

List of registered archives.

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

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`

library_archives()

 
Deprecated.

List of archives present in the revision library.

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

default_archive()

 
Default Archive object or None.

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

make_continuation(source_revision, tag_version)

 
Deprecated.

:see: `Revision.make_continuation`

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`

iter_revision_libraries()

 
Iterate over registered revision library directories.

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

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.

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`.

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


Variables Details

backend

Value:
commandline.default_backend()