##// END OF EJS Templates
obsutil: pass a diffopts object to context.diff
Boris Feld -
r38587:f65e6095 default
parent child Browse files
Show More
@@ -15,7 +15,10 b' from . import ('
15 phases,
15 phases,
16 util,
16 util,
17 )
17 )
18 from .utils import dateutil
18 from .utils import (
19 dateutil,
20 diffutil,
21 )
19
22
20 ### obsolescence marker flag
23 ### obsolescence marker flag
21
24
@@ -392,13 +395,13 b' def _cmpdiff(leftctx, rightctx):'
392
395
393 This is a first and basic implementation, with many shortcoming.
396 This is a first and basic implementation, with many shortcoming.
394 """
397 """
395
398 diffopts = diffutil.diffopts(leftctx._repo.ui, {'git': True})
396 # 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
397 # with an unfiltered repository to safely compute the diff
400 # with an unfiltered repository to safely compute the diff
398 leftunfi = leftctx._repo.unfiltered()[leftctx.rev()]
401 leftunfi = leftctx._repo.unfiltered()[leftctx.rev()]
399 leftdiff = leftunfi.diff(opts={'git': True})
402 leftdiff = leftunfi.diff(opts=diffopts)
400 rightunfi = rightctx._repo.unfiltered()[rightctx.rev()]
403 rightunfi = rightctx._repo.unfiltered()[rightctx.rev()]
401 rightdiff = rightunfi.diff(opts={'git': True})
404 rightdiff = rightunfi.diff(opts=diffopts)
402
405
403 left, right = (0, 0)
406 left, right = (0, 0)
404 while None not in (left, right):
407 while None not in (left, right):
General Comments 0
You need to be logged in to leave comments. Login now