revset: pass an explicit `diffopts` objet to context.diff
authorBoris Feld <boris.feld@octobus.net>
Sat, 23 Jun 2018 14:37:10 +0200
changeset 38565 6ec996e8c9bc
parent 38564 64f15e22f4f8
child 38566 1770416de208
revset: pass an explicit `diffopts` objet to context.diff
mercurial/revset.py
--- a/mercurial/revset.py	Sat Jun 23 14:30:31 2018 +0200
+++ b/mercurial/revset.py	Sat Jun 23 14:37:10 2018 +0200
@@ -33,6 +33,7 @@
 )
 from .utils import (
     dateutil,
+    diffutil,
     stringutil,
 )
 
@@ -1803,7 +1804,8 @@
         'phase': lambda r: repo[r].phase(),
         'substate': lambda r: repo[r].substate,
         'summary': lambda r: repo[r].description().splitlines()[0],
-        'diff': lambda r: list(repo[r].diff(opts={'git': True}),)
+        'diff': lambda r: list(repo[r].diff(
+            opts=diffutil.diffopts(repo.ui, {'git': True}))),
     }
     for info in fields:
         getfield = _funcs.get(info, None)