changeset 24753:612ed41ae359 stable

annotate: always prepare ancestry context of base fctx (issue4600) This patch extends the workaround introduced by dd01834a696f. Even if the base fctx is the same as intorrev, _ancestrycontext must be built for faster _changeid lookup. repo: https://hg.mozilla.org/releases/mozilla-beta command: hg annotate -r 4954faa47dd0 gfx/thebes/gfxWindowsPlatform.cpp before: 52.450 sec after: 1.820 sec
author Yuya Nishihara <yuya@tcha.org>
date Thu, 16 Apr 2015 22:33:53 +0900
parents 1784ca148392
children 36993b52d016 e89f909edffa
files mercurial/context.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Sat Apr 04 21:54:12 2015 -0700
+++ b/mercurial/context.py	Thu Apr 16 22:33:53 2015 +0900
@@ -919,6 +919,7 @@
         introrev = self.introrev()
         if self.rev() != introrev:
             base = self.filectx(self.filenode(), changeid=introrev)
+        if getattr(base, '_ancestrycontext', None) is None:
             ac = self._repo.changelog.ancestors([introrev], inclusive=True)
             base._ancestrycontext = ac