##// END OF EJS Templates
obsutil: clarify the access to "repo"...
Boris Feld -
r40564:520514af default
parent child Browse files
Show More
@@ -397,12 +397,14 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 diffopts = diffutil.diffallopts(leftctx.repo().ui, {'git': True})
400 # lefctx.repo() and rightctx.repo() are the same here
401 repo = leftctx.repo()
402 diffopts = diffutil.diffallopts(repo.ui, {'git': True})
401 # Leftctx or right ctx might be filtered, so we need to use the contexts
403 # Leftctx or right ctx might be filtered, so we need to use the contexts
402 # with an unfiltered repository to safely compute the diff
404 # with an unfiltered repository to safely compute the diff
403 leftunfi = leftctx._repo.unfiltered()[leftctx.rev()]
405 leftunfi = repo.unfiltered()[leftctx.rev()]
404 leftdiff = leftunfi.diff(opts=diffopts)
406 leftdiff = leftunfi.diff(opts=diffopts)
405 rightunfi = rightctx._repo.unfiltered()[rightctx.rev()]
407 rightunfi = repo.unfiltered()[rightctx.rev()]
406 rightdiff = rightunfi.diff(opts=diffopts)
408 rightdiff = rightunfi.diff(opts=diffopts)
407
409
408 left, right = (0, 0)
410 left, right = (0, 0)
General Comments 0
You need to be logged in to leave comments. Login now