transaction: use 'util.copyfile' for creating backup
Using 'copyfile' (single file) instead of 'copyfiles' (tree) will ensures
destination file will be overwritten. This will prevent some abort if backup
file are left in place for random reason.
It also seems more correct.
--- a/mercurial/transaction.py Mon Jan 05 12:39:09 2015 -0800
+++ b/mercurial/transaction.py Mon Jan 05 12:44:15 2015 -0800
@@ -206,7 +206,7 @@
if vfs.exists(file):
filepath = vfs.join(file)
backuppath = vfs.join(backupfile)
- util.copyfiles(filepath, backuppath, hardlink=hardlink)
+ util.copyfile(filepath, backuppath, hardlink=hardlink)
else:
backupfile = ''