changeset 25263:fd905b2bea59 stable

transaction: use the proper variable in '_addbackupentry' (issue4684) The 'file' variable was undefined but resolved to the 'file' built-in. This is why pylint complains about overwriting built-ins...
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 22 May 2015 12:13:18 -0500
parents c18b7eb1036f
children 605b1d32c1c0 e16456831516
files mercurial/transaction.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/transaction.py	Fri May 22 11:54:43 2015 -0300
+++ b/mercurial/transaction.py	Fri May 22 12:13:18 2015 -0500
@@ -222,7 +222,7 @@
     def _addbackupentry(self, entry):
         """register a new backup entry and write it to disk"""
         self._backupentries.append(entry)
-        self._backupmap[file] = len(self._backupentries) - 1
+        self._backupmap[entry] = len(self._backupentries) - 1
         self._backupsfile.write("%s\0%s\0%s\0%d\n" % entry)
         self._backupsfile.flush()