##// END OF EJS Templates
blackbox: inline _bbwrite...
Jun Wu -
r34110:50df6cf2 default
parent child Browse files
Show More
@@ -135,10 +135,6 b' def wrapui(ui):'
135 newpath=maxfiles > 0 and path + '.1')
135 newpath=maxfiles > 0 and path + '.1')
136 return self._bbvfs(name, 'a')
136 return self._bbvfs(name, 'a')
137
137
138 def _bbwrite(self, fmt, *args):
139 self._bbfp.write(fmt % args)
140 self._bbfp.flush()
141
142 def log(self, event, *msg, **opts):
138 def log(self, event, *msg, **opts):
143 global lastui
139 global lastui
144 super(blackboxui, self).log(event, *msg, **opts)
140 super(blackboxui, self).log(event, *msg, **opts)
@@ -192,8 +188,11 b' def wrapui(ui):'
192 else:
188 else:
193 src = ''
189 src = ''
194 try:
190 try:
195 ui._bbwrite('%s %s @%s%s (%s)%s> %s',
191 fp = ui._bbfp
196 date, user, rev, changed, pid, src, formattedmsg)
192 fmt = '%s %s @%s%s (%s)%s> %s'
193 args = (date, user, rev, changed, pid, src, formattedmsg)
194 fp.write(fmt % args)
195 fp.flush()
197 except IOError as err:
196 except IOError as err:
198 self.debug('warning: cannot write to blackbox.log: %s\n' %
197 self.debug('warning: cannot write to blackbox.log: %s\n' %
199 err.strerror)
198 err.strerror)
General Comments 0
You need to be logged in to leave comments. Login now