changeset 40735:69206452a2ac

context: small refactoring of `isintroducedafter` This make the next change clearer.
author Boris Feld <boris.feld@octobus.net>
date Mon, 19 Nov 2018 14:30:58 +0000
parents 9fa0d6dd1617
children d98fb3f42f33
files mercurial/context.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Wed Oct 10 00:50:36 2018 +0200
+++ b/mercurial/context.py	Mon Nov 19 14:30:58 2018 +0000
@@ -763,8 +763,10 @@
     def isintroducedafter(self, changelogrev):
         """True if a filectx has been introduced after a given floor revision
         """
-        return (self.linkrev() >= changelogrev
-                or self._introrev() >= changelogrev)
+        if self.linkrev() >= changelogrev:
+            return True
+        introrev = self._introrev()
+        return introrev >= changelogrev
 
     def introrev(self):
         """return the rev of the changeset which introduced this file revision