sshrepo: sort arguments
authorMatt Mackall <mpm@selenic.com>
Wed, 16 Jun 2010 15:01:09 -0500
changeset 11366 1765897fc497
parent 11365 c3d7daa0928e
child 11367 ca4fc993087c
sshrepo: sort arguments All current commands have zero or one args. Future multi-arg commands will want args to appear in a deterministic order.
mercurial/sshrepo.py
--- a/mercurial/sshrepo.py	Wed Jun 16 22:00:02 2010 -0400
+++ b/mercurial/sshrepo.py	Wed Jun 16 15:01:09 2010 -0500
@@ -117,7 +117,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.iteritems():
+        for k, v in sorted(args.iteritems()):
             self.pipeo.write("%s %d\n" % (k, len(v)))
             self.pipeo.write(v)
         self.pipeo.flush()