Mercurial > public > mercurial-scm > hg
comparison mercurial/obsutil.py @ 38586:79d7d715f3d0
obsutil: use public interface to access to repo.ui
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 06 Jul 2018 21:38:33 +0900 |
parents | f65e6095c5ac |
children | b62000a28812 |
comparison
equal
deleted
inserted
replaced
38585:66eb74f9d87d | 38586:79d7d715f3d0 |
---|---|
393 def _cmpdiff(leftctx, rightctx): | 393 def _cmpdiff(leftctx, rightctx): |
394 """return True if both ctx introduce the "same diff" | 394 """return True if both ctx introduce the "same diff" |
395 | 395 |
396 This is a first and basic implementation, with many shortcoming. | 396 This is a first and basic implementation, with many shortcoming. |
397 """ | 397 """ |
398 diffopts = diffutil.diffopts(leftctx._repo.ui, {'git': True}) | 398 diffopts = diffutil.diffopts(leftctx.repo().ui, {'git': True}) |
399 # Leftctx or right ctx might be filtered, so we need to use the contexts | 399 # Leftctx or right ctx might be filtered, so we need to use the contexts |
400 # with an unfiltered repository to safely compute the diff | 400 # with an unfiltered repository to safely compute the diff |
401 leftunfi = leftctx._repo.unfiltered()[leftctx.rev()] | 401 leftunfi = leftctx._repo.unfiltered()[leftctx.rev()] |
402 leftdiff = leftunfi.diff(opts=diffopts) | 402 leftdiff = leftunfi.diff(opts=diffopts) |
403 rightunfi = rightctx._repo.unfiltered()[rightctx.rev()] | 403 rightunfi = rightctx._repo.unfiltered()[rightctx.rev()] |