changeset 45128:d23881b17388

extdiff: remove unrequired do3way argument to diffpatch() When we are diffing patches, there is no 3 way diff. Differential Revision: https://phab.mercurial-scm.org/D8688
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 07 Jul 2020 13:24:13 +0530
parents da2e69a278df
children 30c31de4d1db
files hgext/extdiff.py
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/extdiff.py	Tue Jul 07 13:13:18 2020 +0530
+++ b/hgext/extdiff.py	Tue Jul 07 13:24:13 2020 +0530
@@ -350,7 +350,7 @@
                 proc.wait()
 
 
-def diffpatch(ui, repo, node1a, node2, tmproot, matcher, cmdline, do3way):
+def diffpatch(ui, repo, node1a, node2, tmproot, matcher, cmdline):
     template = b'hg-%h.patch'
     with formatter.nullformatter(ui, b'extdiff', {}) as fm:
         cmdutil.export(
@@ -369,12 +369,13 @@
     cmdline = formatcmdline(
         cmdline,
         repo.root,
-        do3way=do3way,
         parent1=dir1a,
         plabel1=label1a,
         parent2=dir1b,
         plabel2=label1b,
         child=dir2,
+        # no 3way while comparing patches
+        do3way=False,
         clabel=label2,
     )
     ui.debug(b'running %r in %s\n' % (pycompat.bytestr(cmdline), tmproot))
@@ -567,9 +568,7 @@
     tmproot = pycompat.mkdtemp(prefix=b'extdiff.')
     try:
         if opts.get(b'patch'):
-            return diffpatch(
-                ui, repo, node1a, node2, tmproot, matcher, cmdline, do3way
-            )
+            return diffpatch(ui, repo, node1a, node2, tmproot, matcher, cmdline)
 
         return diffrevs(
             ui,