##// END OF EJS Templates
configitems: register 'blackbox.maxsize' as an example of 'configbytes'...
marmoute -
r33130:0a638f37 default
parent child Browse files
Show More
@@ -58,6 +58,13 b" testedwith = 'ships-with-hg-core'"
58 cmdtable = {}
58 cmdtable = {}
59 command = registrar.command(cmdtable)
59 command = registrar.command(cmdtable)
60
60
61 configtable = {}
62 configitem = registrar.configitem(configtable)
63
64 configitem('blackbox', 'maxsize',
65 default=1048576,
66 )
67
61 lastui = None
68 lastui = None
62
69
63 filehandles = {}
70 filehandles = {}
@@ -120,7 +127,7 b' def wrapui(ui):'
120 (newpath, oldpath, err.strerror))
127 (newpath, oldpath, err.strerror))
121
128
122 fp = _openlog(self._bbvfs)
129 fp = _openlog(self._bbvfs)
123 maxsize = self.configbytes('blackbox', 'maxsize', 1048576)
130 maxsize = self.configbytes('blackbox', 'maxsize')
124 if maxsize > 0:
131 if maxsize > 0:
125 st = self._bbvfs.fstat(fp)
132 st = self._bbvfs.fstat(fp)
126 if st.st_size >= maxsize:
133 if st.st_size >= maxsize:
General Comments 0
You need to be logged in to leave comments. Login now