This instance will be upgraded to Heptapod 0.21.0rc3 on 2021-04-23 at 10:30 UTC+2 (a few minutes of down time)

Commit cb756b6c authored by Jörg Sonnenberger's avatar Jörg Sonnenberger

transaction: rename find to findoffset and drop backup file support

transaction.find used to support access to both the regular file and
backup file list. They have different formats, so any consumer has to be
aware of the difference alredy. There is no in-core consumer for the
backup file access, so don't provide it.

Differential Revision:
parent 63edc384d3b7
......@@ -2000,12 +2000,11 @@ class revlog(object):
trinfo = tr.find(self.indexfile)
if trinfo is None:
troffset = tr.findoffset(self.indexfile)
if troffset is None:
raise error.RevlogError(
_(b"%s not found in the transaction") % self.indexfile
troffset = trinfo[1]
trindex = 0
tr.add(self.datafile, 0)
......@@ -395,11 +395,9 @@ class transaction(util.transactional):
return any
def find(self, file):
def findoffset(self, file):
if file in self._map:
return self._entries[self._map[file]]
if file in self._backupmap:
return self._backupentries[self._backupmap[file]]
return self._entries[self._map[file]][1]
return None
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment