Mercurial > hg
changeset 24454:59904edf0a5e
revlog: make converting from inline to non-line work after a strip
The checkinlinesize function, which converts inline revlogs to non-inline,
uses the current transaction's "data" field to determine how to update the
transaction after the conversion.
This change works around the missing data field, which is not in the
transaction after a strip.
author | Mike Edgar <adgar@google.com> |
---|---|
date | Wed, 25 Mar 2015 15:58:31 -0400 |
parents | 65f1a29685ab |
children | 16961d43dc89 |
files | mercurial/revlog.py |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlog.py Tue Mar 24 12:52:53 2015 -0700 +++ b/mercurial/revlog.py Wed Mar 25 15:58:31 2015 -0400 @@ -1129,7 +1129,12 @@ % self.indexfile) trindex = trinfo[2] - dataoff = self.start(trindex) + if trindex is not None: + dataoff = self.start(trindex) + else: + # revlog was stripped at start of transaction, use all leftover data + trindex = len(self) - 1 + dataoff = self.end(-2) tr.add(self.datafile, dataoff)