##// END OF EJS Templates
blackbox: inline temporary variables which are referenced only once
Yuya Nishihara -
r40667:4a38a67d default
parent child Browse files
Show More
@@ -165,9 +165,6 b' def wrapui(ui):'
165 165 else:
166 166 return
167 167
168 vfs = ui._bbvfs
169 repo = ui._bbrepo
170
171 168 if getattr(ui, '_bbinlog', False):
172 169 # recursion and failure guard
173 170 return
@@ -180,7 +177,7 b' def wrapui(ui):'
180 177 formattedmsg = msg[0] % msg[1:]
181 178 rev = '(unknown)'
182 179 changed = ''
183 ctx = repo[None]
180 ctx = ui._bbrepo[None]
184 181 parents = ctx.parents()
185 182 rev = ('+'.join([hex(p.node()) for p in parents]))
186 183 if (ui.configbool('blackbox', 'dirty') and
@@ -193,7 +190,7 b' def wrapui(ui):'
193 190 try:
194 191 fmt = '%s %s @%s%s (%s)%s> %s'
195 192 args = (date, user, rev, changed, pid, src, formattedmsg)
196 with _openlogfile(ui, vfs) as fp:
193 with _openlogfile(ui, ui._bbvfs) as fp:
197 194 fp.write(fmt % args)
198 195 except (IOError, OSError) as err:
199 196 self.debug('warning: cannot write to blackbox.log: %s\n' %
General Comments 0
You need to be logged in to leave comments. Login now