Patchwork D8688: extdiff: remove unrequired do3way argument to diffpatch()

login
register
mail settings
Submitter phabricator
Date July 7, 2020, 9:27 a.m.
Message ID <differential-rev-PHID-DREV-uojsbkksielpoxprpj3n-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46641/
State Superseded
Headers show

Comments

phabricator - July 7, 2020, 9:27 a.m.
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  When we are diffing patches, there is no 3 way diff.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8688

AFFECTED FILES
  hgext/extdiff.py

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/extdiff.py b/hgext/extdiff.py
--- a/hgext/extdiff.py
+++ b/hgext/extdiff.py
@@ -350,7 +350,7 @@ 
                 proc.wait()
 
 
-def diffpatch(ui, repo, node1a, node2, tmproot, matcher, cmdline, do3way):
+def diffpatch(ui, repo, node1, 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 @@ 
 
     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,