D3893: ui: make the large file warning limit fully configurable

Yuya Nishihara yuya at tcha.org
Fri Jul 6 22:43:59 EDT 2018


The idea looks good.

>   While add --large can be used to override it selectively, often enough
>   the user simply doesn't care about machines with less than 100MB RAM or
>   so, so make it possible to just specify a larger limit in hgrc.

I think --large is the option to add a file as largefile of the largefiles
extension.

> -                if st.st_size > 10000000:
> +                limit = ui.config('ui', 'largefilelimit')
> +                if limit != 0 and st.st_size > limit:

`ui.config()` returns a string. Perhaps `ui.configbytes()` can be used
instead.

Can you add tests for limit=0 and st_size <= limit?


More information about the Mercurial-devel mailing list