mercurial/repair.py
changeset 30001 e38d85be978f
parent 29954 769aee32fae0
child 30274 c1345969f6c5
--- a/mercurial/repair.py	Thu Sep 22 21:51:59 2016 +0900
+++ b/mercurial/repair.py	Thu Sep 22 21:52:00 2016 +0900
@@ -181,7 +181,8 @@
 
             for i in xrange(offset, len(tr.entries)):
                 file, troffset, ignore = tr.entries[i]
-                repo.svfs(file, 'a').truncate(troffset)
+                with repo.svfs(file, 'a', checkambig=True) as fp:
+                    fp.truncate(troffset)
                 if troffset == 0:
                     repo.store.markremoved(file)