Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
50418:13b66bcc9de8 | 50419:10db46e128d4 |
---|---|
174 # related operation transform and update result tuple. | 174 # related operation transform and update result tuple. |
175 if flag & flags: | 175 if flag & flags: |
176 vhash = True | 176 vhash = True |
177 | 177 |
178 if flag not in revlog._flagprocessors: | 178 if flag not in revlog._flagprocessors: |
179 hint = None | |
180 if flag == REVIDX_EXTSTORED: | |
181 hint = _(b"the lfs extension must be enabled") | |
182 | |
179 message = _(b"missing processor for flag '%#x'") % flag | 183 message = _(b"missing processor for flag '%#x'") % flag |
180 raise revlog._flagserrorclass(message) | 184 raise revlog._flagserrorclass(message, hint=hint) |
181 | 185 |
182 processor = revlog._flagprocessors[flag] | 186 processor = revlog._flagprocessors[flag] |
183 if processor is not None: | 187 if processor is not None: |
184 readtransform, writetransform, rawtransform = processor | 188 readtransform, writetransform, rawtransform = processor |
185 | 189 |