# HG changeset patch # User Mike Edgar # Date 2015-03-25 19:58:31 # Node ID 59904edf0a5e38e70d04f6d9693ac2a97e5dbe8d # Parent 65f1a29685abfb9f9bc8207d9da1775ec74c05f3 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. diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -1129,7 +1129,12 @@ class revlog(object): % 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)