equal
deleted
inserted
replaced
1832 if revornode is None: |
1832 if revornode is None: |
1833 revornode = templatefilters.short(hex(node)) |
1833 revornode = templatefilters.short(hex(node)) |
1834 raise RevlogError(_("integrity check failed on %s:%s") |
1834 raise RevlogError(_("integrity check failed on %s:%s") |
1835 % (self.indexfile, pycompat.bytestr(revornode))) |
1835 % (self.indexfile, pycompat.bytestr(revornode))) |
1836 |
1836 |
1837 def checkinlinesize(self, tr, fp=None): |
1837 def _enforceinlinesize(self, tr, fp=None): |
1838 """Check if the revlog is too big for inline and convert if so. |
1838 """Check if the revlog is too big for inline and convert if so. |
1839 |
1839 |
1840 This should be called after revisions are added to the revlog. If the |
1840 This should be called after revisions are added to the revlog. If the |
1841 revlog has grown too large to be an inline revlog, it will convert it |
1841 revlog has grown too large to be an inline revlog, it will convert it |
1842 to use multiple index and data files. |
1842 to use multiple index and data files. |
2143 offset += curr * self._io.size |
2143 offset += curr * self._io.size |
2144 transaction.add(self.indexfile, offset, curr) |
2144 transaction.add(self.indexfile, offset, curr) |
2145 ifh.write(entry) |
2145 ifh.write(entry) |
2146 ifh.write(data[0]) |
2146 ifh.write(data[0]) |
2147 ifh.write(data[1]) |
2147 ifh.write(data[1]) |
2148 self.checkinlinesize(transaction, ifh) |
2148 self._enforceinlinesize(transaction, ifh) |
2149 |
2149 |
2150 def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None): |
2150 def addgroup(self, deltas, linkmapper, transaction, addrevisioncb=None): |
2151 """ |
2151 """ |
2152 add a delta group |
2152 add a delta group |
2153 |
2153 |