# HG changeset patch # User Matt Harbison # Date 1677614426 18000 # Node ID 10db46e128d43572eec0ef3d72aa2af9e55b665e # Parent 13b66bcc9de844c5f8bb015ef27633540a6848de 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. diff -r 13b66bcc9de8 -r 10db46e128d4 mercurial/revlogutils/flagutil.py --- 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: diff -r 13b66bcc9de8 -r 10db46e128d4 tests/test-lfs-serve.t --- a/tests/test-lfs-serve.t Mon Feb 27 23:12:23 2023 -0500 +++ b/tests/test-lfs-serve.t Tue Feb 28 15:00:26 2023 -0500 @@ -314,6 +314,7 @@ transaction abort! rollback completed abort: missing processor for flag '0x2000' + (the lfs extension must be enabled) [50] $ hg debugrequires -R $TESTTMP/client4_pull/ | grep 'lfs' [1]