[PATCH 3 of 5 V2] extdiff: remove unrequired do3way argument to diffpatch()
Pulkit Goyal
7895pulkit at gmail.com
Thu Jul 16 09:56:48 UTC 2020
# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1594108453 -19800
# Tue Jul 07 13:24:13 2020 +0530
# Node ID 9d17a3f106a78059d3d315d577490182653a2075
# Parent 5a5891c75cc4646e4e6ea10ed4e9c3aab7e9a049
# EXP-Topic diff-refactor
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
diff --git a/hgext/extdiff.py b/hgext/extdiff.py
--- a/hgext/extdiff.py
+++ b/hgext/extdiff.py
@@ -350,7 +350,7 @@ def _runperfilediff(
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 @@ def diffpatch(ui, repo, node1a, node2, t
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 @@ def dodiff(ui, repo, cmdline, pats, opts
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,
More information about the Mercurial-devel
mailing list