transaction: backup file in a dedicated "namespace"
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 07 Aug 2014 10:54:17 -0700
changeset 22077 2990ce46fc2d
parent 22076 e59b5e5918a5
child 22078 feb4797c676e
transaction: backup file in a dedicated "namespace" File backup may conflict with other "journal.*" file. We add a fixed part in the backup name file to prevent it.
mercurial/transaction.py
--- a/mercurial/transaction.py	Thu Aug 07 11:56:32 2014 -0700
+++ b/mercurial/transaction.py	Thu Aug 07 10:54:17 2014 -0700
@@ -154,7 +154,7 @@
 
         if file in self.map or file in self.backupmap:
             return
-        backupfile = "%s.%s" % (self.journal, file)
+        backupfile = "%s.backup.%s" % (self.journal, file)
         if self.opener.exists(file):
             filepath = self.opener.join(file)
             backuppath = self.opener.join(backupfile)