Mercurial > hg
comparison mercurial/tagmerge.py @ 36733:66250de006c6
py3: do not mutate dict while iterating in tagmerge
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 04 Mar 2018 16:13:46 -0500 |
parents | d1aa3fee4ca4 |
children | b77ff4fbe9ad |
comparison
equal
deleted
inserted
replaced
36732:723e87c8c059 | 36733:66250de006c6 |
---|---|
144 generate an .hgtags file which is correct (in the sense that its contents | 144 generate an .hgtags file which is correct (in the sense that its contents |
145 correspond to the result of the tag merge) while also being as close as | 145 correspond to the result of the tag merge) while also being as close as |
146 possible to the first parent's .hgtags file. | 146 possible to the first parent's .hgtags file. |
147 ''' | 147 ''' |
148 # group the node-tag pairs that must be written next to each other | 148 # group the node-tag pairs that must be written next to each other |
149 for tname, taglist in mergedtags.items(): | 149 for tname, taglist in list(mergedtags.items()): |
150 mergedtags[tname] = grouptagnodesbyline(taglist) | 150 mergedtags[tname] = grouptagnodesbyline(taglist) |
151 | 151 |
152 # convert the grouped merged tags dict into a format that resembles the | 152 # convert the grouped merged tags dict into a format that resembles the |
153 # final .hgtags file (i.e. a list of blocks of 'node tag' pairs) | 153 # final .hgtags file (i.e. a list of blocks of 'node tag' pairs) |
154 def taglist2string(tlist, tname): | 154 def taglist2string(tlist, tname): |
267 return True, 1 | 267 return True, 1 |
268 | 268 |
269 writemergedtags(fcd, mergedtags) | 269 writemergedtags(fcd, mergedtags) |
270 ui.note(_('.hgtags merged successfully\n')) | 270 ui.note(_('.hgtags merged successfully\n')) |
271 return False, 0 | 271 return False, 0 |
272 |