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.
Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGa936d1368fc5: ui: make the large file warning limit fully configurable
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
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?
mercurial/configitems.py | ||
---|---|---|
1093 | Suggestion: large-file-limit. https://www.mercurial-scm.org/wiki/UIGuideline#naming_config_options |
Suggestion: large-file-limit. https://www.mercurial-scm.org/wiki/UIGuideline#naming_config_options