changeset 25294:b1b89a0a606d stable

transaction: really fix _addbackupentry key usage (issue4684) The fix in fd905b2bea59 is actually wrong. We now use the filename to match what '_addentry'. This whole untested code is quite suspicious. This seems to point that no one is ever running 'tr.find' for a backup file.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 26 May 2015 13:02:28 -0700
parents 708b19c18adf
children bcb17d7dbec2 884ef09cf658
files mercurial/transaction.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/transaction.py	Tue May 26 06:45:18 2015 -0500
+++ b/mercurial/transaction.py	Tue May 26 13:02:28 2015 -0700
@@ -222,7 +222,7 @@
     def _addbackupentry(self, entry):
         """register a new backup entry and write it to disk"""
         self._backupentries.append(entry)
-        self._backupmap[entry] = len(self._backupentries) - 1
+        self._backupmap[entry[1]] = len(self._backupentries) - 1
         self._backupsfile.write("%s\0%s\0%s\0%d\n" % entry)
         self._backupsfile.flush()