changeset 34289:1d6558f5ea74

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
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 20 Sep 2017 07:46:55 +0530
parents fc3b8483c6cb
children 4f969b9e0cf5
files mercurial/cmdutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)