##// END OF EJS Templates
annotate: prepare ancestry context of workingfilectx...
Yuya Nishihara -
r24818:8d7d0bf6 stable
parent child Browse files
Show More
@@ -906,8 +906,15 b' class basefilectx(object):'
906 introrev = self.introrev()
906 introrev = self.introrev()
907 if self.rev() != introrev:
907 if self.rev() != introrev:
908 base = self.filectx(self.filenode(), changeid=introrev)
908 base = self.filectx(self.filenode(), changeid=introrev)
909 if introrev and getattr(base, '_ancestrycontext', None) is None:
909 if getattr(base, '_ancestrycontext', None) is None:
910 ac = self._repo.changelog.ancestors([introrev], inclusive=True)
910 cl = self._repo.changelog
911 if introrev is None:
912 # wctx is not inclusive, but works because _ancestrycontext
913 # is used to test filelog revisions
914 ac = cl.ancestors([p.rev() for p in base.parents()],
915 inclusive=True)
916 else:
917 ac = cl.ancestors([introrev], inclusive=True)
911 base._ancestrycontext = ac
918 base._ancestrycontext = ac
912
919
913 # This algorithm would prefer to be recursive, but Python is a
920 # This algorithm would prefer to be recursive, but Python is a
General Comments 0
You need to be logged in to leave comments. Login now