changeset 11366:1765897fc497

sshrepo: sort arguments All current commands have zero or one args. Future multi-arg commands will want args to appear in a deterministic order.
author Matt Mackall <mpm@selenic.com>
date Wed, 16 Jun 2010 15:01:09 -0500
parents c3d7daa0928e
children ca4fc993087c
files mercurial/sshrepo.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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()