mercurial/context.py
changeset 2628 9999a796d389
parent 2627 b779319a532b
child 2629 a49534aac47d
equal deleted inserted replaced
2627:b779319a532b 2628:9999a796d389
    49 
    49 
    50     def filenode(self, path):
    50     def filenode(self, path):
    51         node, flag = self._repo.manifest.find(self.changeset()[0], path)
    51         node, flag = self._repo.manifest.find(self.changeset()[0], path)
    52         return node
    52         return node
    53 
    53 
    54     def filectx(self, path):
    54     def filectx(self, path, fileid=None):
    55         """get a file context from this changeset"""
    55         """get a file context from this changeset"""
    56         return filectx(self._repo, path, fileid=self.filenode(path))
    56         if fileid is None:
       
    57             fileid = self.filenode(path)
       
    58         return filectx(self._repo, path, fileid=fileid)
    57 
    59 
    58     def filectxs(self):
    60     def filectxs(self):
    59         """generate a file context for each file in this changeset's
    61         """generate a file context for each file in this changeset's
    60            manifest"""
    62            manifest"""
    61         mf = self.manifest()
    63         mf = self.manifest()