Mercurial > hg
comparison mercurial/transaction.py @ 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 | 774ee9800146 |
children | 605b1d32c1c0 b1b89a0a606d |
comparison
equal
deleted
inserted
replaced
25246:c18b7eb1036f | 25263:fd905b2bea59 |
---|---|
220 self._addbackupentry((location, file, backupfile, False)) | 220 self._addbackupentry((location, file, backupfile, False)) |
221 | 221 |
222 def _addbackupentry(self, entry): | 222 def _addbackupentry(self, entry): |
223 """register a new backup entry and write it to disk""" | 223 """register a new backup entry and write it to disk""" |
224 self._backupentries.append(entry) | 224 self._backupentries.append(entry) |
225 self._backupmap[file] = len(self._backupentries) - 1 | 225 self._backupmap[entry] = len(self._backupentries) - 1 |
226 self._backupsfile.write("%s\0%s\0%s\0%d\n" % entry) | 226 self._backupsfile.write("%s\0%s\0%s\0%d\n" % entry) |
227 self._backupsfile.flush() | 227 self._backupsfile.flush() |
228 | 228 |
229 @active | 229 @active |
230 def registertmp(self, tmpfile, location=''): | 230 def registertmp(self, tmpfile, location=''): |