Show More
@@ -291,7 +291,7 b' class changectx(object):' | |||||
291 | try: |
|
291 | try: | |
292 | return self._manifest[path], self._manifest.flags(path) |
|
292 | return self._manifest[path], self._manifest.flags(path) | |
293 | except KeyError: |
|
293 | except KeyError: | |
294 | raise error.LookupError(self._node, path, |
|
294 | raise error.ManifestLookupError(self._node, path, | |
295 | _('not found in manifest')) |
|
295 | _('not found in manifest')) | |
296 | if '_manifestdelta' in self.__dict__ or path in self.files(): |
|
296 | if '_manifestdelta' in self.__dict__ or path in self.files(): | |
297 | if path in self._manifestdelta: |
|
297 | if path in self._manifestdelta: | |
@@ -299,7 +299,7 b' class changectx(object):' | |||||
299 | self._manifestdelta.flags(path)) |
|
299 | self._manifestdelta.flags(path)) | |
300 | node, flag = self._repo.manifest.find(self._changeset[0], path) |
|
300 | node, flag = self._repo.manifest.find(self._changeset[0], path) | |
301 | if not node: |
|
301 | if not node: | |
302 | raise error.LookupError(self._node, path, |
|
302 | raise error.ManifestLookupError(self._node, path, | |
303 | _('not found in manifest')) |
|
303 | _('not found in manifest')) | |
304 |
|
304 | |||
305 | return node, flag |
|
305 | return node, flag |
@@ -27,6 +27,9 b' class LookupError(RevlogError, KeyError)' | |||||
27 | def __str__(self): |
|
27 | def __str__(self): | |
28 | return RevlogError.__str__(self) |
|
28 | return RevlogError.__str__(self) | |
29 |
|
29 | |||
|
30 | class ManifestLookupError(LookupError): | |||
|
31 | pass | |||
|
32 | ||||
30 | class CommandError(Exception): |
|
33 | class CommandError(Exception): | |
31 | """Exception raised on errors in parsing the command line.""" |
|
34 | """Exception raised on errors in parsing the command line.""" | |
32 |
|
35 |
@@ -245,7 +245,8 b' class hgweb(object):' | |||||
245 | except (error.LookupError, error.RepoLookupError), err: |
|
245 | except (error.LookupError, error.RepoLookupError), err: | |
246 | req.respond(HTTP_NOT_FOUND, ctype) |
|
246 | req.respond(HTTP_NOT_FOUND, ctype) | |
247 | msg = str(err) |
|
247 | msg = str(err) | |
248 |
if util.safehasattr(err, 'name') and |
|
248 | if (util.safehasattr(err, 'name') and | |
|
249 | not isinstance(err, error.ManifestLookupError)): | |||
249 | msg = 'revision not found: %s' % err.name |
|
250 | msg = 'revision not found: %s' % err.name | |
250 | return tmpl('error', error=msg) |
|
251 | return tmpl('error', error=msg) | |
251 | except (error.RepoError, error.RevlogError), inst: |
|
252 | except (error.RepoError, error.RevlogError), inst: |
General Comments 0
You need to be logged in to leave comments.
Login now