comparison mercurial/copies.py @ 7622:4dd7b28003d2

use dict.iteritems() rather than dict.items() This should be faster and more future-proof. Calls where the result is to be sorted using util.sort() have been left unchanged. Calls to .items() on configparser objects have been left as-is, too.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 12 Jan 2009 09:16:03 +0100
parents f67d1468ac50
children 4a4c7f6a5912
comparison
equal deleted inserted replaced
7621:6d891df43a5f 7622:4dd7b28003d2
187 invalid = {} 187 invalid = {}
188 dirmove = {} 188 dirmove = {}
189 189
190 # examine each file copy for a potential directory move, which is 190 # examine each file copy for a potential directory move, which is
191 # when all the files in a directory are moved to a new directory 191 # when all the files in a directory are moved to a new directory
192 for dst, src in fullcopy.items(): 192 for dst, src in fullcopy.iteritems():
193 dsrc, ddst = _dirname(src), _dirname(dst) 193 dsrc, ddst = _dirname(src), _dirname(dst)
194 if dsrc in invalid: 194 if dsrc in invalid:
195 # already seen to be uninteresting 195 # already seen to be uninteresting
196 continue 196 continue
197 elif dsrc in d1 and ddst in d1: 197 elif dsrc in d1 and ddst in d1: