X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/96bc5f73483f3e907eebd60df638a9de0a9124f3..91a84926407f9f10739b2423c449bc98a57ea424:/lib/wlrepo/mercurial_backend/revision.py?ds=sidebyside diff --git a/lib/wlrepo/mercurial_backend/revision.py b/lib/wlrepo/mercurial_backend/revision.py old mode 100644 new mode 100755 index f05637d2..5b1b820a --- a/lib/wlrepo/mercurial_backend/revision.py +++ b/lib/wlrepo/mercurial_backend/revision.py @@ -99,5 +99,16 @@ class MercurialRevision(wlrepo.Revision): finally: lock.release() + def parent(self): + parents = self._changectx.parents() + + if len(parents) == 1: + return self._library._revision(parents[0]) + + if parents[0].branch() == self.branch(): + return self._library._revision(parents[0]) + else: + return self._library._revision(parents[1]) + def __eq__(self, other): return self._changectx.node() == other._changectx.node()