Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
7621:6d891df43a5f | 7622:4dd7b28003d2 |
---|---|
113 __del__ = cleanup | 113 __del__ = cleanup |
114 | 114 |
115 def do_cmd(self, cmd, **args): | 115 def do_cmd(self, cmd, **args): |
116 self.ui.debug(_("sending %s command\n") % cmd) | 116 self.ui.debug(_("sending %s command\n") % cmd) |
117 self.pipeo.write("%s\n" % cmd) | 117 self.pipeo.write("%s\n" % cmd) |
118 for k, v in args.items(): | 118 for k, v in args.iteritems(): |
119 self.pipeo.write("%s %d\n" % (k, len(v))) | 119 self.pipeo.write("%s %d\n" % (k, len(v))) |
120 self.pipeo.write(v) | 120 self.pipeo.write(v) |
121 self.pipeo.flush() | 121 self.pipeo.flush() |
122 | 122 |
123 return self.pipei | 123 return self.pipei |