transaction: use the proper variable in '_addbackupentry' (issue4684) stable
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 22 May 2015 12:13:18 -0500
branchstable
changeset 25263 fd905b2bea59
parent 25246 c18b7eb1036f
child 25264 605b1d32c1c0
child 25265 e16456831516
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...
mercurial/transaction.py
--- 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()