mercurial/revlog.py
changeset 24454 59904edf0a5e
parent 24444 27e3ba73fbb1
child 25113 0ca8410ea345
equal deleted inserted replaced
24453:65f1a29685ab 24454:59904edf0a5e
  1127         if trinfo is None:
  1127         if trinfo is None:
  1128             raise RevlogError(_("%s not found in the transaction")
  1128             raise RevlogError(_("%s not found in the transaction")
  1129                               % self.indexfile)
  1129                               % self.indexfile)
  1130 
  1130 
  1131         trindex = trinfo[2]
  1131         trindex = trinfo[2]
  1132         dataoff = self.start(trindex)
  1132         if trindex is not None:
       
  1133             dataoff = self.start(trindex)
       
  1134         else:
       
  1135             # revlog was stripped at start of transaction, use all leftover data
       
  1136             trindex = len(self) - 1
       
  1137             dataoff = self.end(-2)
  1133 
  1138 
  1134         tr.add(self.datafile, dataoff)
  1139         tr.add(self.datafile, dataoff)
  1135 
  1140 
  1136         if fp:
  1141         if fp:
  1137             fp.flush()
  1142             fp.flush()