From ecd11bb01d54cc70ce97789034304b2ce30c73f5 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Tue, 13 Nov 2012 21:18:37 +0100 Subject: [PATCH] Sort content of generated RPC code This is similar to commit f5ce761. A stable sort order makes changes between versions easier to find. Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com> --- autotools/build-rpc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autotools/build-rpc b/autotools/build-rpc index a862d94e5..460f0df59 100755 --- a/autotools/build-rpc +++ b/autotools/build-rpc @@ -125,7 +125,7 @@ def _WriteBaseClass(sw, clsname, calls): raise ValueError("Procedure %s has only %d elements, expected %d" % (v[0], len(v), _RPC_DEF_LEN)) - for (name, kind, _, timeout, args, _, _, desc) in calls: + for (name, kind, _, timeout, args, _, _, desc) in sorted(calls): funcargs = ["self"] if kind == _SINGLE: @@ -201,7 +201,7 @@ def main(): raise Exception("Found duplicate RPC definitions for '%s'" % utils.CommaJoin(sorted(dups))) - for (clsname, calls) in module.CALLS.items(): + for (clsname, calls) in sorted(module.CALLS.items()): _WriteBaseClass(sw, clsname, calls.values()) print buf.getvalue() -- GitLab