[PATCH 2 of 3 V2] revlog: provide a hint for revlog entries that exceed the maximum size

Jordi GutiƩrrez Hermoso jordigh at octave.org
Thu May 28 15:48:59 CDT 2015


# HG changeset patch
# User Jordi GutiƩrrez Hermoso <jordigh at octave.org>
# Date 1432846057 14400
#      Thu May 28 16:47:37 2015 -0400
# Node ID ae1b7ac00f0edb3fd9c8d7c4f0076c5becfab2d3
# Parent  1f8879ee5b6e98b832caefc9ceb1e506b0b23ec4
revlog: provide a hint for revlog entries that exceed the maximum size

For entries that are too large, a common reason would be trying to
commit files that are too large. The most immediate solution would be
the largefiles extension. We prefix this recommendation with a xlast
resort warning.

Another possible reason could be a huge manifest entry, but since
there's no extension in core that handles that problem, we cannot
offer a suggestion there.

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -170,7 +170,9 @@ class revlogio(object):
         # uncompressed length
         if entry[2] > _maxentrysize:
             raise RevlogError(
-                _("maximum revlog storage (%d) exceeded" % _maxentrysize))
+                _("maximum revlog storage (%d) exceeded" % _maxentrysize),
+                hint=_("as a last resort, consider using the largefiles "
+                       "extension"))
 
         p = _pack(indexformatng, *entry)
         if rev == 0:


More information about the Mercurial-devel mailing list