834 work.sort() |
834 work.sort() |
835 |
835 |
836 arraytext, deltatext = m.fastdelta(self._mancache[p1][1], work) |
836 arraytext, deltatext = m.fastdelta(self._mancache[p1][1], work) |
837 cachedelta = self.rev(p1), deltatext |
837 cachedelta = self.rev(p1), deltatext |
838 text = util.buffer(arraytext) |
838 text = util.buffer(arraytext) |
|
839 n = self.addrevision(text, transaction, link, p1, p2, cachedelta) |
839 else: |
840 else: |
840 # The first parent manifest isn't already loaded, so we'll |
841 # The first parent manifest isn't already loaded, so we'll |
841 # just encode a fulltext of the manifest and pass that |
842 # just encode a fulltext of the manifest and pass that |
842 # through to the revlog layer, and let it handle the delta |
843 # through to the revlog layer, and let it handle the delta |
843 # process. |
844 # process. |
844 text = m.text(self._usemanifestv2) |
845 text = m.text(self._usemanifestv2) |
845 arraytext = array.array('c', text) |
846 arraytext = array.array('c', text) |
846 cachedelta = None |
847 n = self.addrevision(text, transaction, link, p1, p2) |
847 |
848 |
848 n = self.addrevision(text, transaction, link, p1, p2, cachedelta) |
|
849 self._mancache[n] = (m, arraytext) |
849 self._mancache[n] = (m, arraytext) |
850 |
850 |
851 return n |
851 return n |