Show More
@@ -418,7 +418,26 b' class filectx(object):' | |||||
418 |
|
418 | |||
419 | @propertycache |
|
419 | @propertycache | |
420 | def _changectx(self): |
|
420 | def _changectx(self): | |
|
421 | try: | |||
421 | return changectx(self._repo, self._changeid) |
|
422 | return changectx(self._repo, self._changeid) | |
|
423 | except error.RepoLookupError: | |||
|
424 | # Linkrev may point to any revision in the repository. When the | |||
|
425 | # repository is filtered this may lead to `filectx` trying to build | |||
|
426 | # `changectx` for filtered revision. In such case we fallback to | |||
|
427 | # creating `changectx` on the unfiltered version of the reposition. | |||
|
428 | # This fallback should not be an issue because`changectx` from | |||
|
429 | # `filectx` are not used in complexe operation that care about | |||
|
430 | # filtering. | |||
|
431 | # | |||
|
432 | # This fallback is a cheap and dirty fix that prevent several | |||
|
433 | # crash. It does not ensure the behavior is correct. However the | |||
|
434 | # behavior was not correct before filtering either and "incorrect | |||
|
435 | # behavior" is seen as better as "crash" | |||
|
436 | # | |||
|
437 | # Linkrevs have several serious troubles with filtering that are | |||
|
438 | # complicated to solve. Proper handling of the issue here should be | |||
|
439 | # considered when solving linkrev issue are on the table. | |||
|
440 | return changectx(self._repo.unfiltered(), self._changeid) | |||
422 |
|
441 | |||
423 | @propertycache |
|
442 | @propertycache | |
424 | def _filelog(self): |
|
443 | def _filelog(self): |
General Comments 0
You need to be logged in to leave comments.
Login now