comparison mercurial/manifest.py @ 11962:5f7ee3db3dd8

revlog._addrevision(): make the parent of the cached delta explicit
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Wed, 18 Aug 2010 19:45:52 +0200
parents cf858e76e992
children f38b0a3308b6
comparison
equal deleted inserted replaced
11961:f3075ffa6b30 11962:5f7ee3db3dd8
186 dline = [l] 186 dline = [l]
187 187
188 if dstart != None: 188 if dstart != None:
189 delta.append([dstart, dend, "".join(dline)]) 189 delta.append([dstart, dend, "".join(dline)])
190 # apply the delta to the addlist, and get a delta for addrevision 190 # apply the delta to the addlist, and get a delta for addrevision
191 cachedelta = addlistdelta(addlist, delta) 191 cachedelta = (self.rev(p1), addlistdelta(addlist, delta))
192
193 # the delta is only valid if we've been processing the tip revision
194 if p1 != self.tip():
195 cachedelta = None
196 arraytext = addlist 192 arraytext = addlist
197 text = buffer(arraytext) 193 text = buffer(arraytext)
198 194
199 n = self.addrevision(text, transaction, link, p1, p2, cachedelta) 195 n = self.addrevision(text, transaction, link, p1, p2, cachedelta)
200 self._mancache = (n, map, arraytext) 196 self._mancache = (n, map, arraytext)