comparison hgext/evolve.py @ 1150:2c99d92faa62 stable

evolve: fix error during iteration over bumped changesets (bug38) We are iterating over a manifest while altering it. We cannot use iteritems() in this context. we move to items, that will be an issue for very large changesets.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 03 Nov 2014 11:11:14 +0000
parents a206ee74f129
children be6eff57d5bb
comparison
equal deleted inserted replaced
1149:a206ee74f129 1150:2c99d92faa62
1413 # Create the new commit context 1413 # Create the new commit context
1414 repo.ui.status(_('computing new diff\n')) 1414 repo.ui.status(_('computing new diff\n'))
1415 files = set() 1415 files = set()
1416 copied = copies.pathcopies(prec, bumped) 1416 copied = copies.pathcopies(prec, bumped)
1417 precmanifest = prec.manifest() 1417 precmanifest = prec.manifest()
1418 for key, val in bumped.manifest().iteritems(): 1418 for key, val in bumped.manifest().items():
1419 if precmanifest.pop(key, None) != val: 1419 if precmanifest.pop(key, None) != val:
1420 files.add(key) 1420 files.add(key)
1421 files.update(precmanifest) # add missing files 1421 files.update(precmanifest) # add missing files
1422 # commit it 1422 # commit it
1423 if files: # something to commit! 1423 if files: # something to commit!