[PATCH 2 of 3 V3] revlog: provide a hint for exceedingly large revlog entries (issue4675)

Jordi GutiƩrrez Hermoso jordigh at octave.org
Tue Jun 2 14:07:09 CDT 2015


# HG changeset patch
# User Jordi GutiƩrrez Hermoso <jordigh at octave.org>
# Date 1433271901 14400
#      Tue Jun 02 15:05:01 2015 -0400
# Node ID 3353bc00fbb14f2930cf0e9b72be312e578d2f6e
# Parent  b7f66f13bd44581a107f2cb8f5655ea05aa06245
revlog: provide a hint for exceedingly large revlog entries (issue4675)

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 "last
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
@@ -171,7 +171,9 @@ class revlogio(object):
         if uncompressedlength > _maxentrysize:
             raise RevlogError(
                 _("size of %d bytes exceeds maximum revlog storage of %d")
-                % (uncompressedlength, _maxentrysize))
+                % (uncompressedlength, _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