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

login
register
mail settings
Submitter Boris Feld
Date July 5, 2018, 10:26 p.m.
Message ID <8bef75984a9d9887b500.1530829566@FB-lair>
Download mbox | patch
Permalink /patch/32658/
State Accepted
Headers show

Comments

Boris Feld - July 5, 2018, 10:26 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@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.

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,