mercurial/upgrade.py
changeset 43001 bb6902cbbe23
parent 42842 a3c2ffcd266f
child 43002 164bbf674bb6
--- a/mercurial/upgrade.py	Fri Sep 27 13:16:37 2019 +0200
+++ b/mercurial/upgrade.py	Fri Sep 27 21:14:03 2019 +0200
@@ -557,8 +557,8 @@
     olddata = oldvfs.join(oldrl.datafile)
     newdata = newvfs.join(newrl.datafile)
 
-    newdir = newvfs.dirname(newrl.indexfile)
-    newvfs.makedirs(newdir)
+    with newvfs(newrl.indexfile, 'w'):
+        pass # create all the directories
 
     util.copyfile(oldindex, newindex)
     if oldrl.opener.exists(olddata):