<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 2, 2019 at 6:57 AM Pierre-Yves David <<a href="mailto:pierre-yves.david@ens-lyon.org">pierre-yves.david@ens-lyon.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><br>
<br>
On 4/2/19 9:52 AM, Josef 'Jeff' Sipek wrote:<br>
> On Sun, Mar 31, 2019 at 17:36:23 +0200, Pierre-Yves David wrote:<br>
>> # HG changeset patch<br>
>> # User Pierre-Yves David <<a href="mailto:pierre-yves.david@octobus.net" target="_blank">pierre-yves.david@octobus.net</a>><br>
>> # Date 1553707623 -3600<br>
>> #      Wed Mar 27 18:27:03 2019 +0100<br>
>> # Node ID 2cfe9983fa92313d58f0420ec62f2341a810343e<br>
>> # Parent  108e26fa0a97fe5342a1ce246cc4e4c185803454<br>
>> # EXP-Topic zstd-revlog<br>
>> # Available At <a href="https://bitbucket.org/octobus/mercurial-devel/" rel="noreferrer" target="_blank">https://bitbucket.org/octobus/mercurial-devel/</a><br>
>> #              hg pull <a href="https://bitbucket.org/octobus/mercurial-devel/" rel="noreferrer" target="_blank">https://bitbucket.org/octobus/mercurial-devel/</a> -r 2cfe9983fa92<br>
>> compression: introduce an official `zstd-revlog` requirement<br>
> <br>
> Is the requirement for the compression algo or for the compression algo's<br>
> use in revlog?<br>
<br>
The use of zstd in revlog<br>
<br>
> <br>
> If the former, something like 'compression-<algo>' makes more sense.<br>
> <br>
> If the later, would it be better to call it 'revlog-compression-<algo>' or<br>
> something to that effect?<br></div></blockquote><div> </div><div>I agree with Jeff that the requirement name should be derived from the compression engine name. e.g. the zstd compression engine supporting revlogs will result in the "revlog-compression-zstd" requirement. That, or the compression engine itself advertises an attribute denoting the requirement for revlogs with that compression format. I think I like the latter better, as it means no special casing of specific string values in the requirements code - just special casing for `None`.<br></div><div><br></div><div>Could you please try something along these lines? For clarity, the thing that is bothering me is the leaky implementation where the low-level requirements code has to know about zlib and zstd. All of this should be generic and derived from the registered compression engines: that's what the compression engine abstraction is for.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<br>
> Either way, while a *human* knows that zstd is a compression algo, could it<br>
> make sense to make it easily parsable?  I'm imagining a slightly better<br>
> error messages when requirements fail, or just the ability to<br>
> programmatically identify the algo.  For example, instead of the current:<br>
> <br>
>    abort: repository requires features unknown to this Mercurial: foobar-revlog!<br>
> <br>
> hg could emit:<br>
> <br>
>    abort: repository requires a compression algo unknown to this Mercurial: foobar!<br>
<br>
I'm that longer version has much value. Most of our requirement has name <br>
opaque to normal user. This is why we link to an explanatory pages.<br>
<br>
Once this series is in, I am planning to do some UI polish. Especially, <br>
for version that know this requirement but have been compiled without <br>
zstd support, we can issue a better message.<br>
<br>
> <br>
>><br>
>> This requirement supersede `exp-compression-zstd`. However, we keep support for<br>
> <br>
> s/supersede/supersedes/ :)<br>
> <br>
> Jeff.<br>
> <br>
<br>
-- <br>
Pierre-Yves David<br>
</div></blockquote></div></div>