X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/39d26aa0f2cb893f19282657b2fddd2a494f2263..4a1d358fcc56a21796d35c8486e0ae6043220fd7:/lib/wlrepo/__init__.py?ds=sidebyside diff --git a/lib/wlrepo/__init__.py b/lib/wlrepo/__init__.py index 9de75a02..f8c07c68 100644 --- a/lib/wlrepo/__init__.py +++ b/lib/wlrepo/__init__.py @@ -73,6 +73,9 @@ class Document(object): def parentof(self, other): return self._revision.parentof(other._revision) + def has_parent_from(self, other): + return self._revision.has_parent_from(other._revision) + def ancestorof(self, other): return self._revision.ancestorof(other._revision) @@ -105,6 +108,9 @@ class LibraryException(Exception): Exception.__init__(self, msg) self.cause = cause +class UpdateException(LibraryException): + pass + class RevisionNotFound(LibraryException): def __init__(self, rev): LibraryException.__init__(self, "Revision %r not found." % rev) @@ -126,7 +132,7 @@ class DocumentAlreadyExists(LibraryException): 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