##// END OF EJS Templates
context: introduce an `isintroducedafter` method and use it in copies...
Boris Feld -
r40730:8a0136f6 default
parent child Browse files
Show More
@@ -760,6 +760,12 b' class basefilectx(object):'
760 # result is crash somewhere else at to some point.
760 # result is crash somewhere else at to some point.
761 return lkr
761 return lkr
762
762
763 def isintroducedafter(self, changelogrev):
764 """True if a filectx has been introduced after a given floor revision
765 """
766 return (self.linkrev() >= changelogrev
767 or self.introrev() >= changelogrev)
768
763 def introrev(self):
769 def introrev(self):
764 """return the rev of the changeset which introduced this file revision
770 """return the rev of the changeset which introduced this file revision
765
771
@@ -139,7 +139,7 b' def _tracefile(fctx, am, limit=-1):'
139 for f in fctx.ancestors():
139 for f in fctx.ancestors():
140 if am.get(f.path(), None) == f.filenode():
140 if am.get(f.path(), None) == f.filenode():
141 return f
141 return f
142 if limit >= 0 and f.linkrev() < limit and f.rev() < limit:
142 if limit >= 0 and not f.isintroducedafter(limit):
143 return None
143 return None
144
144
145 def _dirstatecopies(d, match=None):
145 def _dirstatecopies(d, match=None):
General Comments 0
You need to be logged in to leave comments. Login now