Show More
@@ -92,6 +92,24 b' class basectx(object):' | |||
|
92 | 92 | return self._parents[1] |
|
93 | 93 | return changectx(self._repo, -1) |
|
94 | 94 | |
|
95 | def _fileinfo(self, path): | |
|
96 | if '_manifest' in self.__dict__: | |
|
97 | try: | |
|
98 | return self._manifest[path], self._manifest.flags(path) | |
|
99 | except KeyError: | |
|
100 | raise error.ManifestLookupError(self._node, path, | |
|
101 | _('not found in manifest')) | |
|
102 | if '_manifestdelta' in self.__dict__ or path in self.files(): | |
|
103 | if path in self._manifestdelta: | |
|
104 | return (self._manifestdelta[path], | |
|
105 | self._manifestdelta.flags(path)) | |
|
106 | node, flag = self._repo.manifest.find(self._changeset[0], path) | |
|
107 | if not node: | |
|
108 | raise error.ManifestLookupError(self._node, path, | |
|
109 | _('not found in manifest')) | |
|
110 | ||
|
111 | return node, flag | |
|
112 | ||
|
95 | 113 | class changectx(basectx): |
|
96 | 114 | """A changecontext object makes access to data related to a particular |
|
97 | 115 | changeset convenient. It represents a read-only context already presnt in |
@@ -313,24 +331,6 b' class changectx(basectx):' | |||
|
313 | 331 | troubles.append('divergent') |
|
314 | 332 | return troubles |
|
315 | 333 | |
|
316 | def _fileinfo(self, path): | |
|
317 | if '_manifest' in self.__dict__: | |
|
318 | try: | |
|
319 | return self._manifest[path], self._manifest.flags(path) | |
|
320 | except KeyError: | |
|
321 | raise error.ManifestLookupError(self._node, path, | |
|
322 | _('not found in manifest')) | |
|
323 | if '_manifestdelta' in self.__dict__ or path in self.files(): | |
|
324 | if path in self._manifestdelta: | |
|
325 | return (self._manifestdelta[path], | |
|
326 | self._manifestdelta.flags(path)) | |
|
327 | node, flag = self._repo.manifest.find(self._changeset[0], path) | |
|
328 | if not node: | |
|
329 | raise error.ManifestLookupError(self._node, path, | |
|
330 | _('not found in manifest')) | |
|
331 | ||
|
332 | return node, flag | |
|
333 | ||
|
334 | 334 | def filenode(self, path): |
|
335 | 335 | return self._fileinfo(path)[0] |
|
336 | 336 |
General Comments 0
You need to be logged in to leave comments.
Login now