[PATCH 1 of 2 STABLE RFC] revlog: factor out _maxinline global
Greg Ward
greg-hg at gerg.ca
Tue Apr 13 17:32:34 CDT 2010
# HG changeset patch
# User Greg Ward <greg-hg at gerg.ca>
# Date 1271195918 14400
# Branch stable
# Node ID fcd774f7d93d55fc74c04a4f8cb9c7ef7722af1c
# Parent 2d61b612a09df0263ca00ad08cbf35779d7d5eee
revlog: factor out _maxinline global.
This lets us change the threshold at which a *.d file will be split
out, which should make it much easier to construct test cases that
probe revlogs with a separate data file.
(issue2137)
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -33,6 +33,8 @@
_prereadsize = 1048576
+_maxinline = 131072 # max size of revlog with inline data
+
RevlogError = error.RevlogError
LookupError = error.LookupError
@@ -1010,7 +1012,7 @@
return text
def checkinlinesize(self, tr, fp=None):
- if not self._inline or (self.start(-2) + self.length(-2)) < 131072:
+ if not self._inline or (self.start(-2) + self.length(-2)) < _maxinline:
return
trinfo = tr.find(self.indexfile)
More information about the Mercurial-devel
mailing list