--- a/mercurial/context.py Wed Oct 18 11:44:56 2006 -0500
+++ b/mercurial/context.py Wed Oct 18 14:06:48 2006 -0500
@@ -151,7 +151,10 @@
if '_fileid' in self.__dict__:
self._filenode = self._filelog.lookup(self._fileid)
else:
- self._filenode = self._changectx.filenode(self._path)
+ try:
+ self._filenode = self._changectx.filenode(self._path)
+ except:
+ self._filenode = self._filerev = None
except revlog.RevlogError, inst:
raise repo.LookupError(str(inst))
return self._filenode
@@ -162,7 +165,7 @@
raise AttributeError, name
def __nonzero__(self):
- return self._filerev != nullid
+ return self._filenode != None
def __str__(self):
return "%s@%s" % (self.path(), short(self.node()))