diff mercurial/context.py @ 38601:a936d1368fc5

ui: make the large file warning limit fully configurable 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. Differential Revision: https://phab.mercurial-scm.org/D3893
author Joerg Sonnenberger <joerg@bec.de>
date Fri, 06 Jul 2018 17:57:46 +0200
parents 91618801d5c3
children 760cc5dc01e8
line wrap: on
line diff
--- a/mercurial/context.py	Sat Jun 09 18:26:04 2018 +0900
+++ b/mercurial/context.py	Fri Jul 06 17:57:46 2018 +0200
@@ -1341,7 +1341,8 @@
                     ui.warn(_("%s does not exist!\n") % uipath(f))
                     rejected.append(f)
                     continue
-                if st.st_size > 10000000:
+                limit = ui.configbytes('ui', 'large-file-limit')
+                if limit != 0 and st.st_size > limit:
                     ui.warn(_("%s: up to %d MB of RAM may be required "
                               "to manage this file\n"
                               "(use 'hg revert %s' to cancel the "