[PATCH] config: make config.items() return a copy

Yuya Nishihara yuya at tcha.org
Fri May 19 09:23:42 EDT 2017


On Thu, 18 May 2017 13:51:17 -0700, Martin von Zweigbergk via Mercurial-devel wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz at google.com>
> # Date 1495139917 25200
> #      Thu May 18 13:38:37 2017 -0700
> # Node ID d4f7ddd317c69bf100ed43d312ceace9f28316f1
> # Parent  0d6b3572ad924103128bb9cd296000fc6fd821ef
> config: make config.items() return a copy
> 
> config.items() was iterating over a copy of the data for the the
> specified section on Python 2 by using .items(). However, on Python 3,
> items() does not make a copy, so let's switch to explicitly making a
> copy to make it safe on both Python 2 and Python 3.

Sounds good. Queued, thanks.


More information about the Mercurial-devel mailing list