# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1496259842 -19800 # Node ID aeac3cbcbbc11d80497f2595ac4ab40958a5351a # Parent c2fe2b00db53b5db6170d5e57301a798332c3c9f 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. diff -r c2fe2b00db53 -r aeac3cbcbbc1 mercurial/copies.py --- 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,