Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 40696: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 |
comparison
equal
deleted
inserted
replaced
40695:9fa0d6dd1617 | 40696:69206452a2ac |
---|---|
761 return lkr | 761 return lkr |
762 | 762 |
763 def isintroducedafter(self, changelogrev): | 763 def isintroducedafter(self, changelogrev): |
764 """True if a filectx has been introduced after a given floor revision | 764 """True if a filectx has been introduced after a given floor revision |
765 """ | 765 """ |
766 return (self.linkrev() >= changelogrev | 766 if self.linkrev() >= changelogrev: |
767 or self._introrev() >= changelogrev) | 767 return True |
768 introrev = self._introrev() | |
769 return introrev >= changelogrev | |
768 | 770 |
769 def introrev(self): | 771 def introrev(self): |
770 """return the rev of the changeset which introduced this file revision | 772 """return the rev of the changeset which introduced this file revision |
771 | 773 |
772 This method is different from linkrev because it take into account the | 774 This method is different from linkrev because it take into account the |