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(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.
  is_registered(self)
Is this location registered?...
  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: :precondition: self.is_registered() :poscondition: not self.is_registered() :raises errors.LocationNotRegistered: this location was not registered.
    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
  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.

:rtype: `Archive`

create_master(self, archive, params)

Create a new master archive at this location.

: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>

:type archive: Archive
:type params: ArchiveLocationParams

create_mirror(self, archive, params)

Create a new archive mirror at this location.

:precondition: not self.is_registered()
    and <url does not exist and is writable>
:postcondition: self.is_registered()
    and <url exists>

:type archive: Archive
:type params: ArchiveLocationParams

is_registered(self)

Is this location registered?

:rtype: bool

make_mirrorer(self, target)

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

:param target: specific location the `MirrorMethod` will mirror to.
:type target: `ArchiveLocation`
:rtype: `MirrorMethod`

:raises error.LocationNotRegistered: at least one of self and target is
    not a registered location.
:raises errors.MirrorLocationMismatch: self and target are registered
    locations for different archives.

meta_info(self, key)

Read a meta-info from this location.

:precondition: self.is_registered()
:param key: name of the meta-info to read.
:type key: str
:raises errors.MetaInfoError: this location has no such meta-info.
:raises 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''.

register(self)

Register this location.

:precondition: not self.is_registered()
:postcondition: self.is_registered()
:raises errors.LocationAlreadyRegistered: this location was already
    registered.

unregister(self)

Unregister this location:

:precondition: self.is_registered()
:poscondition: not self.is_registered()
:raises errors.LocationNotRegistered: this location was not registered.

Property Details

url

Url of this location.

:type: str

Generated by Epydoc 2.1 on Thu Feb 2 14:21:53 2006 http://epydoc.sf.net