Show More
@@ -167,12 +167,6 b' class revlogio(object):' | |||
|
167 | 167 | return index, getattr(index, 'nodemap', None), cache |
|
168 | 168 | |
|
169 | 169 | def packentry(self, entry, node, version, rev): |
|
170 | uncompressedlength = entry[2] | |
|
171 | if uncompressedlength > _maxentrysize: | |
|
172 | raise RevlogError( | |
|
173 | _("size of %d bytes exceeds maximum revlog storage of 2GiB") | |
|
174 | % uncompressedlength) | |
|
175 | ||
|
176 | 170 | p = _pack(indexformatng, *entry) |
|
177 | 171 | if rev == 0: |
|
178 | 172 | p = _pack(versionformat, version) + p[4:] |
@@ -1190,6 +1184,12 b' class revlog(object):' | |||
|
1190 | 1184 | if link == nullrev: |
|
1191 | 1185 | raise RevlogError(_("attempted to add linkrev -1 to %s") |
|
1192 | 1186 | % self.indexfile) |
|
1187 | ||
|
1188 | if len(text) > _maxentrysize: | |
|
1189 | raise RevlogError( | |
|
1190 | _("%s: size of %d bytes exceeds maximum revlog storage of 2GiB") | |
|
1191 | % (self.indexfile, len(text))) | |
|
1192 | ||
|
1193 | 1193 | node = node or self.hash(text, p1, p2) |
|
1194 | 1194 | if node in self.nodemap: |
|
1195 | 1195 | return node |
General Comments 0
You need to be logged in to leave comments.
Login now