Patchwork [11,of,12,V2] context: no longer accept diff options as dictionnary

login
register
mail settings
Submitter Boris Feld
Date July 3, 2018, 10:32 a.m.
Message ID <f323b9631f290ec68d5e.1530613950@FB-lair>
Download mbox | patch
Permalink /patch/32577/
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 1529758985 -7200
#      Sat Jun 23 15:03:05 2018 +0200
# Node ID f323b9631f290ec68d5e5322eedf4b86676a1113
# Parent  8c1405ef2dd9a1bf82dc320b39ee6a359240a088
# EXP-Topic diff-cleanup
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r f323b9631f29
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.

Patch

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,