Show More
@@ -151,7 +151,10 b' class filectx(object):' | |||||
151 | if '_fileid' in self.__dict__: |
|
151 | if '_fileid' in self.__dict__: | |
152 | self._filenode = self._filelog.lookup(self._fileid) |
|
152 | self._filenode = self._filelog.lookup(self._fileid) | |
153 | else: |
|
153 | else: | |
|
154 | try: | |||
154 | self._filenode = self._changectx.filenode(self._path) |
|
155 | self._filenode = self._changectx.filenode(self._path) | |
|
156 | except: | |||
|
157 | self._filenode = self._filerev = None | |||
155 | except revlog.RevlogError, inst: |
|
158 | except revlog.RevlogError, inst: | |
156 | raise repo.LookupError(str(inst)) |
|
159 | raise repo.LookupError(str(inst)) | |
157 | return self._filenode |
|
160 | return self._filenode | |
@@ -162,7 +165,7 b' class filectx(object):' | |||||
162 | raise AttributeError, name |
|
165 | raise AttributeError, name | |
163 |
|
166 | |||
164 | def __nonzero__(self): |
|
167 | def __nonzero__(self): | |
165 |
return self._file |
|
168 | return self._filenode != None | |
166 |
|
169 | |||
167 | def __str__(self): |
|
170 | def __str__(self): | |
168 | return "%s@%s" % (self.path(), short(self.node())) |
|
171 | return "%s@%s" % (self.path(), short(self.node())) |
General Comments 0
You need to be logged in to leave comments.
Login now