Patchwork [07,of,12,V2] revset: pass an explicit `diffopts` objet to context.diff

login
register
mail settings
Submitter Boris Feld
Date July 3, 2018, 10:32 a.m.
Message ID <6f1fd2975f9835108635.1530613946@FB-lair>
Download mbox | patch
Permalink /patch/32573/
State Accepted
Headers show

Comments

Boris Feld - July 3, 2018, 10:32 a.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1529757430 -7200
#      Sat Jun 23 14:37:10 2018 +0200
# Node ID 6f1fd2975f98351086353b56ff4e9dfb54421648
# Parent  de55d9d098b8166d5826a2c77c5c34c1f94672c9
# EXP-Topic diff-cleanup
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 6f1fd2975f98
revset: pass an explicit `diffopts` objet to context.diff

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -33,6 +33,7 @@  from . import (
 )
 from .utils import (
     dateutil,
+    diffutil,
     stringutil,
 )
 
@@ -1802,7 +1803,8 @@  def matching(repo, subset, x):
         '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)