# HG changeset patch # User Augie Fackler # Date 1394643651 14400 # Node ID 5442cab57b09e589e461ca27f54274f0cb503665 # Parent 0084fcd5d7e25d26662bb261d1bf64489882b440 wireproto: remove todict() and use {} literals instead diff -r 0084fcd5d7e2 -r 5442cab57b09 mercurial/wireproto.py --- a/mercurial/wireproto.py Tue Mar 11 16:19:08 2014 -0500 +++ b/mercurial/wireproto.py Wed Mar 12 13:00:51 2014 -0400 @@ -145,9 +145,6 @@ # client side -def todict(**args): - return args - class wirepeer(peer.peerrepository): def batch(self): @@ -166,7 +163,7 @@ def lookup(self, key): self.requirecap('lookup', _('look up remote revision')) f = future() - yield todict(key=encoding.fromlocal(key)), f + yield {'key': encoding.fromlocal(key)}, f d = f.value success, data = d[:-1].split(" ", 1) if int(success): @@ -186,7 +183,7 @@ @batchable def known(self, nodes): f = future() - yield todict(nodes=encodelist(nodes)), f + yield {'nodes': encodelist(nodes)}, f d = f.value try: yield [bool(int(f)) for f in d] @@ -236,10 +233,10 @@ yield False, None f = future() self.ui.debug('preparing pushkey for "%s:%s"\n' % (namespace, key)) - yield todict(namespace=encoding.fromlocal(namespace), - key=encoding.fromlocal(key), - old=encoding.fromlocal(old), - new=encoding.fromlocal(new)), f + yield {'namespace': encoding.fromlocal(namespace), + 'key': encoding.fromlocal(key), + 'old': encoding.fromlocal(old), + 'new': encoding.fromlocal(new)}, f d = f.value d, output = d.split('\n', 1) try: @@ -257,7 +254,7 @@ yield {}, None f = future() self.ui.debug('preparing listkeys for "%s"\n' % namespace) - yield todict(namespace=encoding.fromlocal(namespace)), f + yield {'namespace': encoding.fromlocal(namespace)}, f d = f.value r = {} for l in d.splitlines():