diff mercurial/merge.py @ 44199:7f8bdee0034e

copies: define a type to return from mergecopies() We'll soon return two instances of many of the dicts from `copies.mergecopies()`. That will mean that we need to return 9 different dicts, which is clearly not manageable. This patch instead encapsulates the 4 dicts we'll duplicate in a new type. For now, we still just return one instance of it (plus the separate `diverge` dict). Differential Revision: https://phab.mercurial-scm.org/D7989
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 22 Jan 2020 14:35:30 -0800
parents 8ad263c3a358
children fa9ad1da2e77
line wrap: on
line diff
--- a/mercurial/merge.py	Wed Jan 22 16:45:56 2020 -0800
+++ b/mercurial/merge.py	Wed Jan 22 14:35:30 2020 -0800
@@ -1264,8 +1264,11 @@
 
     copy, movewithdir, diverge, renamedelete, dirmove = {}, {}, {}, {}, {}
     if followcopies:
-        ret = copies.mergecopies(repo, wctx, p2, pa)
-        copy, movewithdir, diverge, renamedelete, dirmove = ret
+        branch_copies, diverge = copies.mergecopies(repo, wctx, p2, pa)
+        copy = branch_copies.copy
+        renamedelete = branch_copies.renamedelete
+        dirmove = branch_copies.dirmove
+        movewithdir = branch_copies.movewithdir
 
     boolbm = pycompat.bytestr(bool(branchmerge))
     boolf = pycompat.bytestr(bool(force))