fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Client-side XSLT renderer prototype.
[redakcja.git]
/
lib
/
wlrepo
/
__init__.py
diff --git
a/lib/wlrepo/__init__.py
b/lib/wlrepo/__init__.py
old mode 100644
(file)
new mode 100755
(executable)
index
0f373d4
..
ed0998c
--- a/
lib/wlrepo/__init__.py
+++ b/
lib/wlrepo/__init__.py
@@
-14,7
+14,7
@@
class Library(object):
"""List all documents in the library."""
pass
"""List all documents in the library."""
pass
- def document_for_rev(self, rev):
+ def document_for_rev
ision
(self, rev):
"""Retrieve a document in the specified revision."""
pass
"""Retrieve a document in the specified revision."""
pass
@@
-73,6
+73,12
@@
class Document(object):
def parentof(self, other):
return self._revision.parentof(other._revision)
def parentof(self, other):
return self._revision.parentof(other._revision)
+ def parent(self):
+ return self._library.document_for_revision(self._revision.parent())
+
+ def has_parent_from(self, other):
+ return self._revision.has_parent_from(other._revision)
+
def ancestorof(self, other):
return self._revision.ancestorof(other._revision)
def ancestorof(self, other):
return self._revision.ancestorof(other._revision)
@@
-108,6
+114,9
@@
class LibraryException(Exception):
class UpdateException(LibraryException):
pass
class UpdateException(LibraryException):
pass
+class OutdatedException(LibraryException):
+ pass
+
class RevisionNotFound(LibraryException):
def __init__(self, rev):
LibraryException.__init__(self, "Revision %r not found." % rev)
class RevisionNotFound(LibraryException):
def __init__(self, rev):
LibraryException.__init__(self, "Revision %r not found." % rev)
@@
-129,7
+138,7
@@
class DocumentAlreadyExists(LibraryException):
def open_library(path, proto, *args, **kwargs):
if proto == 'hg':
def open_library(path, proto, *args, **kwargs):
if proto == 'hg':
- import wlrepo.mercurial_backend
- return wlrepo.mercurial_backend.MercurialLibrary(path, *args, **kwargs)
+ import wlrepo.mercurial_backend
.library
+ return wlrepo.mercurial_backend.
library.
MercurialLibrary(path, *args, **kwargs)
raise NotImplemented()
\ No newline at end of file
raise NotImplemented()
\ No newline at end of file