# HG changeset patch # User Boris Feld <boris.f...@octobus.net> # Date 1539125434 -7200 # Wed Oct 10 00:50:34 2018 +0200 # Node ID 16ef27511c0b9337d1b6cba011bda8b46608dcc6 # Parent 7c37df72e30462089a76be6f3b752f4e374d949b # EXP-Topic copy-perf # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 16ef27511c0b context: take advantage of `_descendantrev` in introrev if available
Before this changeset, `_descendantrev` was ignored and `introrev` could return a "wrong" result. I was previously fine because there seems to be no existing code using both `introrev` and `_descendantrev` at the same time. However, we would like to change that. diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -782,6 +782,11 @@ class basefilectx(object): if toprev is not None: return self._adjustlinkrev(toprev, inclusive=True) + elif r'_descendantrev' in attrs: + introrev = self._adjustlinkrev(self._descendantrev) + # be nice and cache the result of the computation + self._changeid = introrev + return introrev else: return self.linkrev() _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel