Mercurial > public > mercurial-scm > hg-stable
diff mercurial/sshrepo.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 | fe0a4ed4634f |
children | 1d54e2f6c0b7 |
line wrap: on
line diff
--- a/mercurial/sshrepo.py Mon Jan 12 09:07:02 2009 +0100 +++ b/mercurial/sshrepo.py Mon Jan 12 09:16:03 2009 +0100 @@ -115,7 +115,7 @@ def do_cmd(self, cmd, **args): self.ui.debug(_("sending %s command\n") % cmd) self.pipeo.write("%s\n" % cmd) - for k, v in args.items(): + for k, v in args.iteritems(): self.pipeo.write("%s %d\n" % (k, len(v))) self.pipeo.write(v) self.pipeo.flush()