comparison mercurial/sshrepo.py @ 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 9936ed1d04f4
children 02a4373ca5cd
comparison
equal deleted inserted replaced
11365:c3d7daa0928e 11366:1765897fc497
115 __del__ = cleanup 115 __del__ = cleanup
116 116
117 def do_cmd(self, cmd, **args): 117 def do_cmd(self, cmd, **args):
118 self.ui.debug("sending %s command\n" % cmd) 118 self.ui.debug("sending %s command\n" % cmd)
119 self.pipeo.write("%s\n" % cmd) 119 self.pipeo.write("%s\n" % cmd)
120 for k, v in args.iteritems(): 120 for k, v in sorted(args.iteritems()):
121 self.pipeo.write("%s %d\n" % (k, len(v))) 121 self.pipeo.write("%s %d\n" % (k, len(v)))
122 self.pipeo.write(v) 122 self.pipeo.write(v)
123 self.pipeo.flush() 123 self.pipeo.flush()
124 124
125 return self.pipei 125 return self.pipei