X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/3546a2b2d5f52224bcf95803030611ab505f29cd..935076367b73bf9506751fe215cacc09c3d6e417:/lib/wlrepo/mercurial_backend/document.py?ds=inline diff --git a/lib/wlrepo/mercurial_backend/document.py b/lib/wlrepo/mercurial_backend/document.py index 3f94097a..fcfd14c4 100644 --- a/lib/wlrepo/mercurial_backend/document.py +++ b/lib/wlrepo/mercurial_backend/document.py @@ -98,15 +98,20 @@ class MercurialDocument(wlrepo.Document): return (True, False) if self._revision.has_children(): + print 'Update failed: has children.' # can't update non-latest revision return (False, False) sv = self.shared() - - if not sv.ancestorof(self) and not self.parentof(sv): - return self._revision.merge_with(sv._revision, user=user) - return (False, False) + if self.parentof(sv): + return (True, False) + + if sv.ancestorof(self): + return (True, False) + + + return self._revision.merge_with(sv._revision, user=user) finally: lock.release()