Mercurial > public > mercurial-scm > hg-stable
diff mercurial/context.py @ 37447:067e8d1178a2
workingctx: build _manifest on filenode() or flags() request
I'm not sure if this is the best workaround, but this fixes the following
exception:
AttributeError: 'workingctx' object has no attribute '_manifestdelta'
The short hash '303030303030' seen in the test is node.modifiednodeid.
Differential Revision: https://phab.mercurial-scm.org/D2940
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 25 Mar 2018 18:27:43 +0900 |
parents | 3198d5a2514e |
children | d7114f883505 |
line wrap: on
line diff
--- a/mercurial/context.py Fri Apr 06 13:11:40 2018 -0700 +++ b/mercurial/context.py Sun Mar 25 18:27:43 2018 +0900 @@ -1330,6 +1330,11 @@ p = p[:-1] return [changectx(self._repo, x) for x in p] + def _fileinfo(self, path): + # populate __dict__['_manifest'] as workingctx has no _manifestdelta + self._manifest + return super(workingctx, self)._fileinfo(path) + def filectx(self, path, filelog=None): """get a file context from the working directory""" return workingfilectx(self._repo, path, workingctx=self,