[PATCH 4 of 9 V2] revset: pass an explicit `diffopts` objet to context.diff

Boris Feld boris.feld at octobus.net
Thu Jul 5 18:26:02 EDT 2018


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

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,
 )
 
@@ -1803,7 +1804,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)


More information about the Mercurial-devel mailing list