Package pybaz
[frames | no frames]

Package pybaz

High level bindings for the Arch revision control system

Archive Namespace Class Hierarchy

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.


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
ArchiveLocationParams Parameter Object used for creating archives masters and mirrors.
Factory Abstract factory for objects created by the public interface.
    Namespace Classes
ArchiveLocation A location identified by an url and containing a Bazaar archive.
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.
    Abstract Namespace Classes
NamespaceObject Base class for all archive objects.
Setupable Base class for container archive objects.
Package Base class for ordered container archive objects.
CategoryIterable Base class for Archive.
BranchIterable Base class for archive classes above Branch.
VersionIterable Abstract class for archive classes above Version.
RevisionIterable Abstract class for namespace classes above Revision.
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.
    Archive-Related Classes
RevisionFile File component of an archived revision.
NameParser Parser for names in Arch archive namespace.
    Source Tree Classes
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 and Log Classes
Changeset Arch whole-tree changeset.
Patchlog Log entry associated to a revision.
LogMessage Log message for use with commit, import or tag operations.
    Incremental Ouput
ChangesetCreation Incremental changeset generation process.
ChangesetApplication Incremental changeset application process.
Chatter Chatter lines in tla output.
TreeChange Abstract base class for changes summary output lines.
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.
SymlinkModification Changeset summary line for a symlink modification.
MergeOutcome Abstract base class for changeset application summary output lines.
PatchConflict Changeset application summary line for a patch conflict.

Function Summary
    Archive Functions

sequence of Archive

archives()
Deprecated.

iterable of Archive

iter_archives()
Iterate over registered archives.

Archive

make_archive(name, location, signed, listing, tla)
Deprecated.

Archive.

register_archive(name, location)
Deprecated.

WorkingTree

get(revision, dir, link)
Construct a project tree for a revision.

Changeset

get_patch(revision, dir)
Deprecated.
  make_continuation(source_revision, tag_version)
Deprecated.
    Source Tree Functions

WorkingTree

init_tree(directory, version, nested)
Initialize a new project tree.

bool

in_source_tree(directory)
Is directory inside a Arch source tree?

ArchSourceTree

tree_root(directory)
SourceTree containing the given directory.
    User Functions

Archive, None

default_archive()
Default Archive object or None.

str

my_id()
The current registered user id
  set_my_id(new_id)
Set the current registered user id
    Changeset Generation Functions

Changeset

changeset(orig, mod, dest)
Deprecated.

Changeset

delta(orig, mod, dest)
Compute a whole-tree changeset.

ChangesetCreation

iter_delta(orig, mod, dest)
Compute a whole-tree changeset with incremental output.
    Pika Escaping Functions

str

name_escape(name)
Escape a file name using the Arch syntax.

str

name_unescape(name)
Unescape a file name using the Arch syntax.
    Revision Library Functions
  register_revision_library(dirname)
Register an existing revision library directory.
  unregister_revision_library(dirname)
Unregister a revision library directory.

iterable of str

iter_revision_libraries()
Iterate over registered revision library directories.

sequence of Archive

library_archives()
Deprecated.

iterable of Archive

iter_library_archives()
Iterate over archives present in the revision library.
    Incremental Output Functions

iterable of Chatter or str

classify_chatter(iter)
Classify chatter in a sequence of strings.

Iterable of Chatter, TreeChange, str

classify_changeset_creation(lines, pad)
Classify the output of a changeset creation command.

iterable of Chatter, MergeOutcome, str

classify_changeset_application(lines)
Classify the output of a change-producing command.
    Obsolete Utility Functions
  filter_archive_logs(limit, pred)
  filter_revisions(limit, pred)
  grep_summary(limit, rx)
  grep_summary_interactive(limit)
  last_revision(tree)
  map_name_id(tree)
  revision_which_created(file, revision)
  revisions_merging(limit, rev)
  suspected_move(limit)
  temphack(revision)

Variable Summary

backends.commandline.CommandLineBackend

backend: Backend controller.

Function Details

archives()

Deprecated.

List of registered archives.

Returns:

sequence of Archive

See Also:

iter_archives

iter_archives()

Iterate over registered archives.

Returns:

all registered archives.


           (type=

iterable of Archive

)

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

Deprecated.

Parameters:
name -

archive name (e.g. "david@allouche.net--2003b").


           (type=

Archive or str

)
location -

URL of the archive


           (type=

str

)
signed -

create GPG signatures for the archive contents.


           (type=

bool

)
listing -

maintains ''.listing'' files to enable HTTP access.


           (type=

bool

)
tla -

create a tla archive instead of a baz archive.


           (type=

bool

)
Returns:

an Archive instance for the given name.


           (type=

Archive

)
Raises:
errors.NamespaceError -

name is not a valid archive name.

See Also:

ArchiveLocation.create_master

register_archive(name, location)

Deprecated.

Parameters:
name -

archive name, or None to use the official name stored in the archive.


           (type=

str, None

)
location -

URL of the archive.


           (type=

str

)
Returns:

newly registered archive.


           (type=

Archive.

)

See Also:

ArchiveLocation.register

get(revision, dir, link=False)

Construct a project tree for a revision.

Returns:

WorkingTree

See Also:

Revision.get

get_patch(revision, dir)

Deprecated.

Returns:

Changeset

See Also:

Revision.get_patch

make_continuation(source_revision, tag_version)

Deprecated.

See Also:

Revision.make_continuation

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

Initialize a new project tree.

Parameters:
directory -

directory to initialize as a source tree.


           (type=

str

)
version -

if given, set the the tree-version and create an empty log version.


           (type=

Version

)
nested -

if true, the command will succeed even if 'directory' is already within a source tree.


           (type=

bool

)
Returns:

source tree object for the given directory.


           (type=

WorkingTree

)

in_source_tree(directory=None)

Is directory inside a Arch source tree?

Parameters:
directory -

test if that directory is in an Arch source tree.


           (type=

str

)
Returns:

whether this directory is inside an Arch source tree.


           (type=

bool

)

Warning:

omitting the directory argument is deprecated.

tree_root(directory=None)

SourceTree containing the given directory.

Parameters:
directory -

give the tree-root of this directory. Specify "." to get the tree-root of the current directory.


           (type=

str

)
Returns:

source tree containing directory.


           (type=

ArchSourceTree

)

Warning:

omitting the directory argument is deprecated.

default_archive()

Default Archive object or None.

Returns:

the default archive, or None.


           (type=

Archive, None

)

my_id()

The current registered user id

Returns:

the user id, for example 'John Doe <jdoe@example.org>'.


           (type=

str

)

set_my_id(new_id)

Set the current registered user id

Parameters:
new_id -

new value of the user id.


           (type=

str

)

changeset(orig, mod, dest)

Deprecated.

Returns:

Changeset

See Also:

delta

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.

Parameters:
orig -

the old revision or directory.


           (type=

Revision, ArchSourceTree

)
mod -

the new revision or directory.


           (type=

Revision, ArchSourceTree

)
dest -

path of the changeset to create.


           (type=

str

)
Returns:

changeset from orig to mod.


           (type=

Changeset

)

iter_delta(orig, mod, dest)

Compute a whole-tree changeset with incremental output.

Parameters:
orig -

old revision or directory.


           (type=

Revision, ArchSourceTree

)
mod -

new revision or directory,


           (type=

Revision, ArchSourceTree

)
dest -

path of the changeset to create.


           (type=

str

)
Returns:

ChangesetCreation

name_escape(name)

Escape a file name using the Arch syntax.

Parameters:
name -

unescaped file name.


           (type=

str

)
Returns:

escaped file name.


           (type=

str

)

name_unescape(name)

Unescape a file name using the Arch syntax.

Parameters:
name -

escaped file name.


           (type=

str

)
Returns:

unescaped file name.


           (type=

str

)
Raises:
errors.IllegalEscapeSequence -

the syntax of name is incorrect.

register_revision_library(dirname)

Register an existing revision library directory.

Parameters:
dirname -

absolute path name of existing user-writable directory.


           (type=

str

)

Postcondition:

dirname is present in iter_revision_libraries output.

To Do:

create_revision_library which abstracts out revlib construction.

unregister_revision_library(dirname)

Unregister a revision library directory.

Parameters:
dirname -

registered revision library directory.


           (type=

str

)

Precondition:

dirname is present in iter_revision_libraries output.

Postcondition:

dirname is not listed by iter_revision_libraries.

To Do:

delete_revision_library which abstracts out revlib destruction.

iter_revision_libraries()

Iterate over registered revision library directories.

Returns:

directory names of all registered revision libraries.


           (type=

iterable of str

)

library_archives()

Deprecated.

List of archives present in the revision library.

Returns:

sequence of Archive

See Also:

iter_library_archives

iter_library_archives()

Iterate over archives present in the revision library.

Returns:

all archives which are present in the revision library.


           (type=

iterable of Archive

)

classify_chatter(iter)

Classify chatter in a sequence of strings.

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

Parameters:
iter -

iterable of str

Returns:

iterable of Chatter or str

classify_changeset_creation(lines, pad=' ')

Classify the output of a changeset creation command.

Parameters:
lines -

incremental output from a changeset creation command.


           (type=

iterator of str

)
pad -

padding text between prefix and file name.


           (type=

str

)
Returns:

Iterable of Chatter, TreeChange, str

Note:

diff output (e.g. changes --diffs) is not supported.

classify_changeset_application(lines)

Classify the output of a change-producing command.

Parameters:
lines -

incremental output from a changeset application command.


           (type=

iterable of str

)
Returns:

iterable of Chatter, MergeOutcome, str

Note:

diff output (e.g. changes --diffs) is not supported.


Variable Details

backend

Backend controller.

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

Type:

backends.commandline.CommandLineBackend

Value:
<pybaz.backends.commandline.CommandLineBackend object at 0x3aea4d0c>   

Generated by Epydoc 2.1 on Fri Jul 7 17:05:29 2006 http://epydoc.sf.net