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

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date June 2, 2015, 7:07 p.m.
Message ID <3353bc00fbb14f2930cf.1433272029@Iris>
Download mbox | patch
Permalink /patch/9445/
State Changes Requested
Headers show

Comments

Jordi Gutiérrez Hermoso - June 2, 2015, 7:07 p.m.
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh@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.
Matt Mackall - June 3, 2015, 8:16 p.m.
On Tue, 2015-06-02 at 15:07 -0400, Jordi Gutiérrez Hermoso wrote:
> # HG changeset patch
> # User Jordi Gutiérrez Hermoso <jordigh@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"))

Still not a fan of this one.

Patch

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: