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

Augie Fackler raf at durin42.com
Fri May 29 09:16:04 CDT 2015


On Thu, May 28, 2015 at 04:48:59PM -0400, Jordi GutiƩrrez Hermoso wrote:
> # 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"))

I'm dithering about this hint. How do others feel?

>
>          p = _pack(indexformatng, *entry)
>          if rev == 0:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list