py3: use dict.update() instead of constructing lists and adding them
dict.items() returned a list on Python 2 and whereas on Python 3 it returns a
view object. So we required a work around. Using dict.update() is better then
constructing lists as it should save us on gc churns.
--- a/mercurial/copies.py Fri Feb 03 15:02:27 2017 +0100
+++ b/mercurial/copies.py Thu Jun 01 01:14:02 2017 +0530
@@ -419,8 +419,10 @@
for f in u2u:
_checkcopies(c2, c1, f, base, tca, dirtyc2, limit, data2)
- copy = dict(data1['copy'].items() + data2['copy'].items())
- fullcopy = dict(data1['fullcopy'].items() + data2['fullcopy'].items())
+ copy = dict(data1['copy'])
+ copy.update(data2['copy'])
+ fullcopy = dict(data1['fullcopy'])
+ fullcopy.update(data2['fullcopy'])
if dirtyc1:
_combinecopies(data2['incomplete'], data1['incomplete'], copy, diverge,