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

Type ArchiveLocation

object --+
         |
        ArchiveLocation


A location identified by an url and containing a Bazaar archive.


Method Summary
  __init__(self, url)
  __eq__(self, other)
Compare equal to instances of ArchiveLocation with the same url.
  __ne__(self, other)
Logical complement of __eq__.
  __repr__(self)

Archive

archive(self)
Archive that is associated to this location.
  create_master(self, archive, params)
Create a new master archive at this location.
  create_mirror(self, archive, params)
Create a new archive mirror at this location.

bool

is_registered(self)
Is this location registered?

MirrorMethod

make_mirrorer(self, target)
Create a mirrorer to mirror from this location to the target.
  meta_info(self, key)
Read a meta-info from this location.
  register(self)
Register this location.
  unregister(self)
Unregister this location:
    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

str

url: Url of this location.

Method Details

__eq__(self, other)
(Equality operator)

Compare equal to instances of ArchiveLocation with the same url.

__ne__(self, other)

Logical complement of __eq__.

archive(self)

Archive that is associated to this location.

That's a convenience method based on meta_info() that memoises its result.

Returns:

Archive

create_master(self, archive, params)

Create a new master archive at this location.

Parameters:
archive
           (type=

Archive

)
params
           (type=

ArchiveLocationParams

)

Precondition:

not self.is_registered() and not archive.is_registered() and <url does not exist and is writable>

Postcondition:

archive.is_registered() and archive.location == self and <url exists>

create_mirror(self, archive, params)

Create a new archive mirror at this location.

Parameters:
archive
           (type=

Archive

)
params
           (type=

ArchiveLocationParams

)

Precondition:

not self.is_registered() and <url does not exist and is writable>

Postcondition:

self.is_registered() and <url exists>

is_registered(self)

Is this location registered?

Returns:

bool

make_mirrorer(self, target)

Create a mirrorer to mirror from this location to the target.

Parameters:
target -

specific location the MirrorMethod will mirror to.


           (type=

ArchiveLocation

)
Returns:

MirrorMethod

Raises:
error.LocationNotRegistered -

at least one of self and target is not a registered location.

errors.MirrorLocationMismatch -

self and target are registered locations for different archives.

meta_info(self, key)

Read a meta-info from this location.

Parameters:
key -

name of the meta-info to read.


           (type=

str

)
Raises:
errors.MetaInfoError -

this location has no such meta-info.

errors.LocationNotRegistered -

this location is not registered.

Bug:

will raise errors.MetaInfoError when the location could not be accessed, because baz gives us exit status 1 for ''meta-info not present'' and ''could not access location''.

Precondition:

self.is_registered()

register(self)

Register this location.

Raises:
errors.LocationAlreadyRegistered -

this location was already registered.

Precondition:

not self.is_registered()

Postcondition:

self.is_registered()

unregister(self)

Unregister this location:

Raises:
errors.LocationNotRegistered -

this location was not registered.

Precondition:

self.is_registered()


Property Details

url

Url of this location.


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