repair: iterate store files deterministically
An upcoming test will add a 2nd file. Since readdir() is
non-deterministic, add a sorted() to make traversal deterministic.
--- a/mercurial/repair.py Mon Apr 03 17:34:24 2017 -0400
+++ b/mercurial/repair.py Sat Apr 08 11:35:00 2017 -0700
@@ -868,7 +868,8 @@
'redeltamultibase' in actions)
# Now copy other files in the store directory.
- for p, kind, st in srcrepo.store.vfs.readdir('', stat=True):
+ # The sorted() makes execution deterministic.
+ for p, kind, st in sorted(srcrepo.store.vfs.readdir('', stat=True)):
if not _upgradefilterstorefile(srcrepo, dstrepo, requirements,
p, kind, st):
continue