Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
37446:d46d4f14300a | 37447:067e8d1178a2 |
---|---|
1328 p = self._repo.dirstate.parents() | 1328 p = self._repo.dirstate.parents() |
1329 if p[1] == nullid: | 1329 if p[1] == nullid: |
1330 p = p[:-1] | 1330 p = p[:-1] |
1331 return [changectx(self._repo, x) for x in p] | 1331 return [changectx(self._repo, x) for x in p] |
1332 | 1332 |
1333 def _fileinfo(self, path): | |
1334 # populate __dict__['_manifest'] as workingctx has no _manifestdelta | |
1335 self._manifest | |
1336 return super(workingctx, self)._fileinfo(path) | |
1337 | |
1333 def filectx(self, path, filelog=None): | 1338 def filectx(self, path, filelog=None): |
1334 """get a file context from the working directory""" | 1339 """get a file context from the working directory""" |
1335 return workingfilectx(self._repo, path, workingctx=self, | 1340 return workingfilectx(self._repo, path, workingctx=self, |
1336 filelog=filelog) | 1341 filelog=filelog) |
1337 | 1342 |