mercurial/upgrade.py
changeset 31875 b6d792a9bd11
parent 31799 8110d49e0558
parent 31874 27ec6517e40e
child 31893 165428b05fca
--- a/mercurial/upgrade.py	Mon Apr 10 18:06:22 2017 +0200
+++ b/mercurial/upgrade.py	Tue Apr 11 23:12:14 2017 +0900
@@ -524,14 +524,15 @@
                      '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 _filterstorefile(srcrepo, dstrepo, requirements,
                                        p, kind, st):
             continue
 
         srcrepo.ui.write(_('copying %s\n') % p)
-        src = srcrepo.store.vfs.join(p)
-        dst = dstrepo.store.vfs.join(p)
+        src = srcrepo.store.rawvfs.join(p)
+        dst = dstrepo.store.rawvfs.join(p)
         util.copyfile(src, dst, copystat=True)
 
     _finishdatamigration(ui, srcrepo, dstrepo, requirements)