equal
deleted
inserted
replaced
30 REVLOG_DEFAULT_FLAGS = REVLOGNGINLINEDATA |
30 REVLOG_DEFAULT_FLAGS = REVLOGNGINLINEDATA |
31 REVLOG_DEFAULT_FORMAT = REVLOGNG |
31 REVLOG_DEFAULT_FORMAT = REVLOGNG |
32 REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS |
32 REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS |
33 |
33 |
34 _prereadsize = 1048576 |
34 _prereadsize = 1048576 |
|
35 |
|
36 _maxinline = 131072 # max size of revlog with inline data |
35 |
37 |
36 RevlogError = error.RevlogError |
38 RevlogError = error.RevlogError |
37 LookupError = error.LookupError |
39 LookupError = error.LookupError |
38 |
40 |
39 def getoffset(q): |
41 def getoffset(q): |
1008 |
1010 |
1009 self._cache = (node, rev, text) |
1011 self._cache = (node, rev, text) |
1010 return text |
1012 return text |
1011 |
1013 |
1012 def checkinlinesize(self, tr, fp=None): |
1014 def checkinlinesize(self, tr, fp=None): |
1013 if not self._inline or (self.start(-2) + self.length(-2)) < 131072: |
1015 if not self._inline or (self.start(-2) + self.length(-2)) < _maxinline: |
1014 return |
1016 return |
1015 |
1017 |
1016 trinfo = tr.find(self.indexfile) |
1018 trinfo = tr.find(self.indexfile) |
1017 if trinfo is None: |
1019 if trinfo is None: |
1018 raise RevlogError(_("%s not found in the transaction") |
1020 raise RevlogError(_("%s not found in the transaction") |