diff mercurial/obsutil.py @ 38523:4455e5d4d59c

context: explicitly take diffopts in `context.diff` (API) To provide a proper replacement for the `patch.diff(?)` function, the `context.diff(?)` method needs to be able to take more parameters. To distinguish the diff options from the new other arguments, we upgrade the diff options to its own explicit argument.
author Boris Feld <boris.feld@octobus.net>
date Tue, 22 May 2018 15:02:52 +0200
parents 11d51e518808
children f65e6095c5ac
line wrap: on
line diff
--- a/mercurial/obsutil.py	Sun Jul 01 01:00:39 2018 +0530
+++ b/mercurial/obsutil.py	Tue May 22 15:02:52 2018 +0200
@@ -396,9 +396,9 @@
     # Leftctx or right ctx might be filtered, so we need to use the contexts
     # with an unfiltered repository to safely compute the diff
     leftunfi = leftctx._repo.unfiltered()[leftctx.rev()]
-    leftdiff = leftunfi.diff(git=1)
+    leftdiff = leftunfi.diff(opts={'git': True})
     rightunfi = rightctx._repo.unfiltered()[rightctx.rev()]
-    rightdiff = rightunfi.diff(git=1)
+    rightdiff = rightunfi.diff(opts={'git': True})
 
     left, right = (0, 0)
     while None not in (left, right):