Show More
@@ -397,14 +397,17 b' def _cmpdiff(leftctx, rightctx):' | |||||
397 |
|
397 | |||
398 | This is a first and basic implementation, with many shortcoming. |
|
398 | This is a first and basic implementation, with many shortcoming. | |
399 | """ |
|
399 | """ | |
400 | # lefctx.repo() and rightctx.repo() are the same here |
|
400 | diffopts = diffutil.diffallopts(leftctx.repo().ui, {'git': True}) | |
401 | repo = leftctx.repo() |
|
401 | ||
402 | diffopts = diffutil.diffallopts(repo.ui, {'git': True}) |
|
|||
403 | # Leftctx or right ctx might be filtered, so we need to use the contexts |
|
402 | # Leftctx or right ctx might be filtered, so we need to use the contexts | |
404 | # with an unfiltered repository to safely compute the diff |
|
403 | # with an unfiltered repository to safely compute the diff | |
405 | leftunfi = repo.unfiltered()[leftctx.rev()] |
|
404 | ||
|
405 | # leftctx and rightctx can be from different repository views in case of | |||
|
406 | # hgsubversion, do don't try to access them from same repository | |||
|
407 | # rightctx.repo() and leftctx.repo() are not always the same | |||
|
408 | leftunfi = leftctx._repo.unfiltered()[leftctx.rev()] | |||
406 | leftdiff = leftunfi.diff(opts=diffopts) |
|
409 | leftdiff = leftunfi.diff(opts=diffopts) | |
407 | rightunfi = repo.unfiltered()[rightctx.rev()] |
|
410 | rightunfi = rightctx._repo.unfiltered()[rightctx.rev()] | |
408 | rightdiff = rightunfi.diff(opts=diffopts) |
|
411 | rightdiff = rightunfi.diff(opts=diffopts) | |
409 |
|
412 | |||
410 | left, right = (0, 0) |
|
413 | left, right = (0, 0) |
General Comments 0
You need to be logged in to leave comments.
Login now