context: small refactoring of `isintroducedafter`
authorBoris Feld <boris.feld@octobus.net>
Mon, 19 Nov 2018 14:30:58 +0000
changeset 40696 69206452a2ac
parent 40695 9fa0d6dd1617
child 40697 d98fb3f42f33
context: small refactoring of `isintroducedafter` This make the next change clearer.
mercurial/context.py
--- 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