libbe.storage.vcs.darcs

Darcs backend.

class libbe.storage.vcs.darcs.Darcs(*args, **kwargs)

base.VCS implementation for Darcs.

Methods

add(id, *args, **kwargs) Add an entry
ancestors(*args, **kwargs) Return a list of the specified entry’s ancestors’ ids.
changed(revision)
check_storage_version()
children(*args, **kwargs) Return a list of specified entry’s children’s ids.
commit(*args, **kwargs) Commit the current repository, with a commit message string summary and body.
connect() Open a connection to the repository.
destroy() Remove the storage repository.
disconnect() Close the connection to the repository.
exists(*args, **kwargs) Check an entry’s existence
get(*args, **kwargs) Get contents of and entry as they were in a given revision.
get_user_id() Get the VCS’s suggested user id (e.g. “John Doe <jdoe@example.com>”).
init() Create a new storage repository.
installed()
is_readable()
is_writeable()
path(id[, revision, relpath])
recursive_remove(*args, **kwargs) Remove an entry and all its decendents.
remove(*args, **kwargs) Remove an entry.
revision_id([index])
root() Set the root directory to the path’s VCS root.
set(id, value, *args, **kwargs) Set the entry contents.
storage_version([revision, path]) Return the storage version of the on-disk files.
version()
version_cmp(*args) Compare the installed Darcs version V_i with another version
client = 'darcs'
name = 'darcs'
version_cmp(*args)

Compare the installed Darcs version V_i with another version V_o (given in *args). Returns

1 if V_i > V_o
0 if V_i == V_o
-1 if V_i < V_o

Examples

>>> d = Darcs(repo='.')
>>> d._version = '2.3.1 (release)'
>>> d.version_cmp(2,3,1)
0
>>> d.version_cmp(2,3,2)
-1
>>> d.version_cmp(2,3,0)
1
>>> d.version_cmp(3)
-1
>>> d._version = '2.0.0pre2'
>>> d._parsed_version = None
>>> d.version_cmp(3)
-1
>>> d.version_cmp(2,0,1)
Traceback (most recent call last):
  ...
NotImplementedError: Cannot parse non-integer portion "0pre2" of Darcs version "2.0.0pre2"
libbe.storage.vcs.darcs.new()

This Page