[PATCH 8 of 9 V2] context: no longer accept diff options as dictionnary

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


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1529758985 -7200
#      Sat Jun 23 15:03:05 2018 +0200
# Node ID 8bef75984a9d9887b500c567d2da3da196f49761
# Parent  83a3cddc326c12ab2fba10b92cd408c91f1decaa
# EXP-Topic diff-cleanup
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 8bef75984a9d
context: no longer accept diff options as dictionnary

Since we already broke the API earlier in this stack, there are no point to
introducing a new deprecation warning.

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -30,7 +30,6 @@ from . import (
     error,
     fileset,
     match as matchmod,
-    mdiff,
     obsolete as obsmod,
     patch,
     pathutil,
@@ -304,10 +303,7 @@ class basectx(object):
         if ctx2 is not None:
             ctx2 = self._repo[ctx2]
 
-        if isinstance(opts, mdiff.diffopts):
-            diffopts = opts
-        else:
-            diffopts = patch.diffopts(self._repo.ui, opts)
+        diffopts = opts
         return patch.diff(self._repo, ctx2, self, match=match, changes=changes,
                           opts=diffopts, losedatafn=losedatafn, prefix=prefix,
                           relroot=relroot, copy=copy,


More information about the Mercurial-devel mailing list