##// END OF EJS Templates
Make changectx.filenode raise repo.LookupError on failure
Brendan Cully -
r3242:1539f788 default
parent child Browse files
Show More
@@ -73,8 +73,14 b' class changectx(object):'
73
73
74 def filenode(self, path):
74 def filenode(self, path):
75 if hasattr(self, "_manifest"):
75 if hasattr(self, "_manifest"):
76 return self._manifest[path]
76 try:
77 return self._manifest[path]
78 except KeyError:
79 raise repo.LookupError(_("'%s' not found in manifest") % path)
77 node, flag = self._repo.manifest.find(self._changeset[0], path)
80 node, flag = self._repo.manifest.find(self._changeset[0], path)
81 if not node:
82 raise repo.LookupError(_("'%s' not found in manifest") % path)
83
78 return node
84 return node
79
85
80 def filectx(self, path, fileid=None):
86 def filectx(self, path, fileid=None):
General Comments 0
You need to be logged in to leave comments. Login now