tersestatus: sort the dictionary before iterating on it
There has report of flakiness in test-status-terse.t. In the terse code, we are
iterating on a dictionary without sorting and since python dicts are unordered,
that can be a reason behind the flakiness. Before we have a better
implementation for the terse thing, let's make sure current implementation
possess minimum bugs.
Differential Revision: https://phab.mercurial-scm.org/D740
--- a/mercurial/cmdutil.py Sun Sep 03 20:06:45 2017 +0530
+++ b/mercurial/cmdutil.py Wed Sep 20 07:46:55 2017 +0530
@@ -536,7 +536,7 @@
rs = []
newls = []
- for par, files in pardict.iteritems():
+ for par, files in sorted(pardict.iteritems()):
lenpar = numfiles(par)
if lenpar == len(files):
newls.append(par)