Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revlogutils/flagutil.py @ 50419:10db46e128d4
revlog: add an exception hint when processing LFS flags without the extension
It would be even better if this was either detected sooner, or the transaction
completed (especially since the read/write processors aren't needed for the
exchange). But this makes it easier for the user to resolve until that can be
figured out.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 28 Feb 2023 15:00:26 -0500 |
parents | 6000f5b25c9b |
children | f4733654f144 |
line wrap: on
line diff
--- a/mercurial/revlogutils/flagutil.py Mon Feb 27 23:12:23 2023 -0500 +++ b/mercurial/revlogutils/flagutil.py Tue Feb 28 15:00:26 2023 -0500 @@ -176,8 +176,12 @@ vhash = True if flag not in revlog._flagprocessors: + hint = None + if flag == REVIDX_EXTSTORED: + hint = _(b"the lfs extension must be enabled") + message = _(b"missing processor for flag '%#x'") % flag - raise revlog._flagserrorclass(message) + raise revlog._flagserrorclass(message, hint=hint) processor = revlog._flagprocessors[flag] if processor is not None: