This is an archive of the discontinued Mercurial Phabricator instance.

py3: explicitly convert dict.keys() and dict.items() into a list
ClosedPublic

Authored by pulkit on Sep 30 2017, 8:50 AM.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Sep 30 2017, 8:50 AM
durin42 requested changes to this revision.Sep 30 2017, 8:58 AM
durin42 added a subscriber: durin42.

One nit.

mercurial/copies.py
144

please use list(c) instead of list(c.keys()) - the latter allocates an extra list on Python 2, whereas the former works consistently on both 2 and 3.

This revision now requires changes to proceed.Sep 30 2017, 8:58 AM
pulkit updated this revision to Diff 2185.Sep 30 2017, 9:19 AM
durin42 accepted this revision.Sep 30 2017, 9:20 AM
This revision is now accepted and ready to land.Sep 30 2017, 9:20 AM
This revision was automatically updated to reflect the committed changes.