# HG changeset patch
# User Yuya Nishihara <y...@tcha.org>
# Date 1520198026 18000
#      Sun Mar 04 16:13:46 2018 -0500
# Node ID 8267c6e887a9473e849faf2ac2ab439b9cbffcbf
# Parent  8fe5cf00bb5e51dadafa1811c9fc1aeb2fdb47d4
py3: do not mutate dict while iterating in tagmerge

diff --git a/mercurial/tagmerge.py b/mercurial/tagmerge.py
--- a/mercurial/tagmerge.py
+++ b/mercurial/tagmerge.py
@@ -146,7 +146,7 @@ def writemergedtags(fcd, mergedtags):
     possible to the first parent's .hgtags file.
     '''
     # group the node-tag pairs that must be written next to each other
-    for tname, taglist in mergedtags.items():
+    for tname, taglist in list(mergedtags.items()):
         mergedtags[tname] = grouptagnodesbyline(taglist)
 
     # convert the grouped merged tags dict into a format that resembles the
@@ -269,4 +269,3 @@ def merge(repo, fcd, fco, fca):
     writemergedtags(fcd, mergedtags)
     ui.note(_('.hgtags merged successfully\n'))
     return False, 0
-
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to