D3323: py3: iterate over a copy of dict while changing it

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Fri Apr 13 18:22:31 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG5340daa85c62: py3: iterate over a copy of dict while changing it (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3323?vs=8143&id=8198

REVISION DETAIL
  https://phab.mercurial-scm.org/D3323

AFFECTED FILES
  mercurial/color.py

CHANGE DETAILS

diff --git a/mercurial/color.py b/mercurial/color.py
--- a/mercurial/color.py
+++ b/mercurial/color.py
@@ -168,7 +168,7 @@
         ui._terminfoparams.clear()
         return
 
-    for key, (b, e, c) in ui._terminfoparams.items():
+    for key, (b, e, c) in ui._terminfoparams.copy().items():
         if not b:
             continue
         if not c and not curses.tigetstr(e):



To: pulkit, #hg-reviewers, spectral, durin42
Cc: mercurial-devel


More information about the Mercurial-devel mailing list