##// END OF EJS Templates
ui: make the large file warning limit fully configurable...
Joerg Sonnenberger -
r38619:a936d136 default
parent child Browse files
Show More
@@ -1090,6 +1090,9 b" coreconfigitem('ui', 'interface',"
1090 coreconfigitem('ui', 'interface.chunkselector',
1090 coreconfigitem('ui', 'interface.chunkselector',
1091 default=None,
1091 default=None,
1092 )
1092 )
1093 coreconfigitem('ui', 'large-file-limit',
1094 default=10000000,
1095 )
1093 coreconfigitem('ui', 'logblockedtimes',
1096 coreconfigitem('ui', 'logblockedtimes',
1094 default=False,
1097 default=False,
1095 )
1098 )
@@ -1341,7 +1341,8 b' class workingctx(committablectx):'
1341 ui.warn(_("%s does not exist!\n") % uipath(f))
1341 ui.warn(_("%s does not exist!\n") % uipath(f))
1342 rejected.append(f)
1342 rejected.append(f)
1343 continue
1343 continue
1344 if st.st_size > 10000000:
1344 limit = ui.configbytes('ui', 'large-file-limit')
1345 if limit != 0 and st.st_size > limit:
1345 ui.warn(_("%s: up to %d MB of RAM may be required "
1346 ui.warn(_("%s: up to %d MB of RAM may be required "
1346 "to manage this file\n"
1347 "to manage this file\n"
1347 "(use 'hg revert %s' to cancel the "
1348 "(use 'hg revert %s' to cancel the "
@@ -2138,6 +2138,11 b' User interface controls.'
2138 Possible values are 'text' and 'curses'.
2138 Possible values are 'text' and 'curses'.
2139 This config overrides the interface specified by ui.interface.
2139 This config overrides the interface specified by ui.interface.
2140
2140
2141 ``large-file-limit``
2142 Largest file size that gives no memory use warning.
2143 Possible values are integers or 0 to disable the check.
2144 (default: 10000000)
2145
2141 ``logtemplate``
2146 ``logtemplate``
2142 Template string for commands that print changesets.
2147 Template string for commands that print changesets.
2143
2148
@@ -1860,6 +1860,8 b' Test --normal flag'
1860 $ hg add --normal new-largefile
1860 $ hg add --normal new-largefile
1861 new-largefile: up to 69 MB of RAM may be required to manage this file
1861 new-largefile: up to 69 MB of RAM may be required to manage this file
1862 (use 'hg revert new-largefile' to cancel the pending addition)
1862 (use 'hg revert new-largefile' to cancel the pending addition)
1863 $ hg revert new-largefile
1864 $ hg --config ui.large-file-limit=22M add --normal new-largefile
1863
1865
1864 Test explicit commit of switch between normal and largefile - make sure both
1866 Test explicit commit of switch between normal and largefile - make sure both
1865 the add and the remove is committed.
1867 the add and the remove is committed.
General Comments 0
You need to be logged in to leave comments. Login now