addbackup: use the vfs for the backup destination too
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 14 Nov 2014 14:54:55 +0000
changeset 23314 43f66ae57a66
parent 23313 991098579940
child 23315 66275ecc73c1
addbackup: use the vfs for the backup destination too The backup file location was always computed using the opener, bypassing the 'location' setting. (And making the feature broken.)
mercurial/transaction.py
--- a/mercurial/transaction.py	Thu Nov 13 11:17:36 2014 +0000
+++ b/mercurial/transaction.py	Fri Nov 14 14:54:55 2014 +0000
@@ -208,7 +208,7 @@
             vfs = self.opener
         if vfs.exists(file):
             filepath = vfs.join(file)
-            backuppath = self.opener.join(backupfile)
+            backuppath = vfs.join(backupfile)
             util.copyfiles(filepath, backuppath, hardlink=hardlink)
         else:
             backupfile = ''