Mercurial > public > mercurial-scm > hg
comparison mercurial/revlog.py @ 45870:a6f08085edfe
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: https://phab.mercurial-scm.org/D9276
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Sat, 07 Nov 2020 19:24:12 +0100 |
parents | 63edc384d3b7 |
children | 89a2afe31e82 |
comparison
equal
deleted
inserted
replaced
45869:63edc384d3b7 | 45870:a6f08085edfe |
---|---|
1998 not self._inline | 1998 not self._inline |
1999 or (self.start(tiprev) + self.length(tiprev)) < _maxinline | 1999 or (self.start(tiprev) + self.length(tiprev)) < _maxinline |
2000 ): | 2000 ): |
2001 return | 2001 return |
2002 | 2002 |
2003 trinfo = tr.find(self.indexfile) | 2003 troffset = tr.findoffset(self.indexfile) |
2004 if trinfo is None: | 2004 if troffset is None: |
2005 raise error.RevlogError( | 2005 raise error.RevlogError( |
2006 _(b"%s not found in the transaction") % self.indexfile | 2006 _(b"%s not found in the transaction") % self.indexfile |
2007 ) | 2007 ) |
2008 troffset = trinfo[1] | |
2009 trindex = 0 | 2008 trindex = 0 |
2010 tr.add(self.datafile, 0) | 2009 tr.add(self.datafile, 0) |
2011 | 2010 |
2012 if fp: | 2011 if fp: |
2013 fp.flush() | 2012 fp.flush() |