diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py --- a/mercurial/obsutil.py +++ b/mercurial/obsutil.py @@ -397,14 +397,12 @@ This is a first and basic implementation, with many shortcoming. """ - # lefctx.repo() and rightctx.repo() are the same here - repo = leftctx.repo() - diffopts = diffutil.diffallopts(repo.ui, {'git': True}) + diffopts = diffutil.diffallopts(leftctx.repo().ui, {'git': True}) # Leftctx or right ctx might be filtered, so we need to use the contexts # with an unfiltered repository to safely compute the diff - leftunfi = repo.unfiltered()[leftctx.rev()] + leftunfi = leftctx._repo.unfiltered()[leftctx.rev()] leftdiff = leftunfi.diff(opts=diffopts) - rightunfi = repo.unfiltered()[rightctx.rev()] + rightunfi = rightctx._repo.unfiltered()[rightctx.rev()] rightdiff = rightunfi.diff(opts=diffopts) left, right = (0, 0)