Define an HTTP-based VersionedStorage implementation.
libbe.command.serve : the associated server
VersionedStorage implementation over HTTP.
Uses GET to retrieve information and POST to set information.
Methods
| add | |
| ancestors | |
| changed | |
| check_storage_version | |
| children | |
| commit | |
| connect | |
| destroy | |
| disconnect | |
| exists | |
| get | |
| get_post_url(url[, get, data_dict, headers]) | Execute a GET or POST transaction. |
| init | |
| is_readable | |
| is_writeable | |
| parse_repo | |
| recursive_remove | |
| remove | |
| revision_id | |
| set | |
| storage_version | |
| version |
Grab username and password (if any) from the repo URL.
Examples
>>> s = HTTP('http://host.com/path/to/repo')
>>> s.repo
'http://host.com/path/to/repo'
>>> s.uname == None
True
>>> s.password == None
True
>>> s.parse_repo('http://joe:secret@host.com/path/to/repo')
('http://host.com/path/to/repo', 'joe', 'secret')
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.
| Raises : | InvalidRevision :
|
|---|
Status returned to indicate exceptions on the server side.
A BE-specific extension to the HTTP/1.1 protocol (See RFC 2616).
Execute a GET or POST transaction.
| Parameters : | url : str
get : bool
data_dict : dict
headers : list
|
|---|