Abstract bug repository data storage to easily support multiple backends.
Methods
| append | L.append(object) – append object to end |
| branch_len() | Return the largest number of nodes from root to leaf (inclusive). |
| count(...) | |
| extend | L.extend(iterable) – extend list by appending elements from the iterable |
| has_descendant(descendant[, depth_first, ...]) | Check if a node is contained in a tree. |
| index((value, [start, ...) | Raises ValueError if the value is not present. |
| insert | L.insert(index, object) – insert object before index |
| pop(...) | Raises IndexError if list is empty or index is out of range. |
| remove | L.remove(value) – remove first occurrence of value. |
| reverse | L.reverse() – reverse IN PLACE |
| sort(*args, **kwargs) | Sort the tree recursively. |
| thread([flatten]) | Generate a (depth, node) tuple for every node in the tree. |
| traverse([depth_first]) | Generate all the nodes in a tree, starting with the root node. |
This class declares all the methods required by a Storage interface. This implementation just keeps the data in a dictionary and uses pickle for persistent storage.
Methods
| add(id, *args, **kwargs) | Add an entry |
| ancestors(*args, **kwargs) | Return a list of the specified entry’s ancestors’ ids. |
| children(*args, **kwargs) | Return a list of specified entry’s children’s ids. |
| 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. |
| init() | Create a new storage repository. |
| is_readable() | |
| is_writeable() | |
| recursive_remove(*args, **kwargs) | Remove an entry and all its decendents. |
| remove(*args, **kwargs) | Remove an entry. |
| set(id, value, *args, **kwargs) | Set the entry contents. |
| storage_version([revision]) | Return the storage format for this backend. |
| version() | Return a version string for this backend. |
Add an entry
Return a list of the specified entry’s ancestors’ ids.
Return a list of specified entry’s children’s ids.
Open a connection to the repository.
Remove the storage repository.
Close the connection to the repository.
Check an entry’s existence
Get contents of and entry as they were in a given revision. revision==None specifies the current revision.
If there is no id, return default, unless default is not given, in which case raise InvalidID.
Create a new storage repository.
Remove an entry and all its decendents.
Remove an entry.
Set the entry contents.
Return the storage format for this backend.
Return a version string for this backend.
This class declares all the methods required by a Storage interface that supports versioning. This implementation just keeps the data in a list and uses pickle for persistent storage.
Methods
| add(id, *args, **kwargs) | Add an entry |
| ancestors(*args, **kwargs) | Return a list of the specified entry’s ancestors’ ids. |
| changed(revision) | Return a tuple of lists of ids (new, modified, removed) from the |
| 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. |
| init() | Create a new storage repository. |
| is_readable() | |
| is_writeable() | |
| recursive_remove(*args, **kwargs) | Remove an entry and all its decendents. |
| remove(*args, **kwargs) | Remove an entry. |
| revision_id([index]) | Return the name of the <index>th revision. |
| set(id, value, *args, **kwargs) | Set the entry contents. |
| storage_version([revision]) | Return the storage format for this backend. |
| version() | Return a version string for this backend. |
Return a tuple of lists of ids (new, modified, removed) from the specified revision to the current situation.
Commit the current repository, with a commit message string summary and body. Return the name of the new revision.
If allow_empty == False (the default), raise EmptyCommit if there are no changes to commit.
Return the name of the <index>th revision. The choice of which branch to follow when crossing branches/merges is not defined. Revision indices start at 1; ID 0 is the blank repository.
Return None if index==None.
If the specified revision does not exist, raise InvalidRevision.