X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/bd2f4130a81e68a2bb3c8d88448540ec60fe7be5..7a12b550f4a8366c8ace2f9c55706aba7c4b17f7:/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..80b761f7 --- a/lib/wlrepo/mercurial_backend/revision.py +++ b/lib/wlrepo/mercurial_backend/revision.py @@ -99,5 +99,13 @@ class MercurialRevision(wlrepo.Revision): finally: lock.release() + def parent(self): + parents = self._changectx.parents() + + if len(parents) == 1: + return parents[0] + + return parents[0] if (parents[0].branch() == self.branch()) else parents[1] + def __eq__(self, other): return self._changectx.node() == other._changectx.node()