Mercurial > hg-stable
changeset 40734:9fa0d6dd1617
context: split `introrev` logic in a sub function
We want to add a mechanism to stop iteration early associated to intro rev early
in some case. However, it does not make sense to expose it in the public
`filectx` API. So we split the code into an internal method instead.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 10 Oct 2018 00:50:36 +0200 |
parents | 8a0136f69027 |
children | 69206452a2ac |
files | mercurial/context.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Wed Oct 10 00:50:35 2018 +0200 +++ b/mercurial/context.py Wed Oct 10 00:50:36 2018 +0200 @@ -764,7 +764,7 @@ """True if a filectx has been introduced after a given floor revision """ return (self.linkrev() >= changelogrev - or self.introrev() >= changelogrev) + or self._introrev() >= changelogrev) def introrev(self): """return the rev of the changeset which introduced this file revision @@ -775,6 +775,9 @@ 'linkrev-shadowing' when a file revision is used by multiple changesets. """ + return self._introrev() + + def _introrev(self): toprev = None attrs = vars(self) if r'_changeid' in attrs: