fix: make the order of the work queue deterministic
authorDanny Hooper <hooper@google.com>
Thu, 21 Mar 2019 18:27:09 -0700
changeset 42009 8f427f7c1f71
parent 42008 7f6b375a8903
child 42010 db26dbbee74d
fix: make the order of the work queue deterministic This makes any output generated during the parallel phase of execution stable if parallelism is disabled. This helps write tests like that in the future. Differential Revision: https://phab.mercurial-scm.org/D6166
hgext/fix.py
--- a/hgext/fix.py	Thu Mar 21 18:35:39 2019 -0700
+++ b/hgext/fix.py	Thu Mar 21 18:27:09 2019 -0700
@@ -280,8 +280,8 @@
     for rev in sorted(revstofix):
         fixctx = repo[rev]
         match = scmutil.match(fixctx, pats, opts)
-        for path in pathstofix(ui, repo, pats, opts, match, basectxs[rev],
-                               fixctx):
+        for path in sorted(pathstofix(
+                        ui, repo, pats, opts, match, basectxs[rev], fixctx)):
             fctx = fixctx[path]
             if fctx.islink():
                 continue