D740: tersestatus: sort the dictionary before iterating on it
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Wed Sep 20 02:17:30 UTC 2017
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D740
AFFECTED FILES
mercurial/cmdutil.py
CHANGE DETAILS
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -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)
To: pulkit, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list