Patchwork D2164: py3: avoid changing dictionary during iteration

login
register
mail settings
Submitter phabricator
Date Feb. 13, 2018, 2:47 a.m.
Message ID <08952641295bd5a088bd6cd03268b179@localhost.localdomain>
Download mbox | patch
Permalink /patch/27766/
State Not Applicable
Headers show

Comments

phabricator - Feb. 13, 2018, 2:47 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc02771617a70: py3: avoid changing dictionary during iteration (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2164?vs=5465&id=5588

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

AFFECTED FILES
  mercurial/copies.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -123,7 +123,7 @@ 
             t[k] = v
 
     # remove criss-crossed copies
-    for k, v in t.items():
+    for k, v in list(t.items()):
         if k in src and v in dst:
             del t[k]