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): |
1034 |
1036 |
1035 self._cache = (node, rev, text) |
1037 self._cache = (node, rev, text) |
1036 return text |
1038 return text |
1037 |
1039 |
1038 def checkinlinesize(self, tr, fp=None): |
1040 def checkinlinesize(self, tr, fp=None): |
1039 if not self._inline or (self.start(-2) + self.length(-2)) < 131072: |
1041 if not self._inline or (self.start(-2) + self.length(-2)) < _maxinline: |
1040 return |
1042 return |
1041 |
1043 |
1042 trinfo = tr.find(self.indexfile) |
1044 trinfo = tr.find(self.indexfile) |
1043 if trinfo is None: |
1045 if trinfo is None: |
1044 raise RevlogError(_("%s not found in the transaction") |
1046 raise RevlogError(_("%s not found in the transaction") |