Mercurial > public > mercurial-scm > hg-stable
diff hgext/rebase.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 | 7bf7c073375e |
children | e3f8c6d6b72e |
line wrap: on
line diff
--- a/hgext/rebase.py Mon Jan 12 09:07:02 2009 +0100 +++ b/hgext/rebase.py Mon Jan 12 09:16:03 2009 +0100 @@ -281,7 +281,7 @@ f.write(repo[target].hex() + '\n') f.write(repo[external].hex() + '\n') f.write('%d\n' % int(collapse)) - for d, v in state.items(): + for d, v in state.iteritems(): oldrev = repo[d].hex() newrev = repo[v].hex() f.write("%s:%s\n" % (oldrev, newrev))