Mercurial > hg-stable
changeset 23770:50f0096a7346
filectx: fix annotate to not directly instantiate filectx
28a302e9225d changed basefilectx.annotate() to directly instantiate new
filectx's instead of going through self.filectx(), this breaks extensions that
replace the filectx class, and would also break future uses that would need
memfilectx's.
author | Durham Goode <durham@fb.com> |
---|---|
date | Fri, 09 Jan 2015 11:21:29 -0800 |
parents | bb3ee61cfaa1 |
children | 9f81f9e5b47a |
files | mercurial/context.py |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Wed Dec 31 18:39:41 2014 -0500 +++ b/mercurial/context.py Fri Jan 09 11:21:29 2015 -0800 @@ -893,8 +893,7 @@ base = self introrev = self.introrev() if self.rev() != introrev: - base = filectx(self._repo, self._path, filelog=self.filelog(), - fileid=self.filenode(), changeid=introrev) + base = self.filectx(self.filenode(), changeid=introrev) # This algorithm would prefer to be recursive, but Python is a # bit recursion-hostile. Instead we do an iterative @@ -1000,11 +999,11 @@ # considered when solving linkrev issue are on the table. return changectx(self._repo.unfiltered(), self._changeid) - def filectx(self, fileid): + def filectx(self, fileid, changeid=None): '''opens an arbitrary revision of the file without opening a new filelog''' return filectx(self._repo, self._path, fileid=fileid, - filelog=self._filelog) + filelog=self._filelog, changeid=changeid) def data(self): try: