hgext/blackbox.py
changeset 34276 b90bd9a98c8b
parent 34275 86a5df995880
child 34299 b1d4ac068961
equal deleted inserted replaced
34275:86a5df995880 34276:b90bd9a98c8b
   190     if not repo.local():
   190     if not repo.local():
   191         return
   191         return
   192 
   192 
   193     if util.safehasattr(ui, 'setrepo'):
   193     if util.safehasattr(ui, 'setrepo'):
   194         ui.setrepo(repo)
   194         ui.setrepo(repo)
       
   195 
       
   196         # Set lastui even if ui.log is not called. This gives blackbox a
       
   197         # fallback place to log.
       
   198         global lastui
       
   199         if lastui is None:
       
   200             lastui = ui
       
   201 
   195     repo._wlockfreeprefix.add('blackbox.log')
   202     repo._wlockfreeprefix.add('blackbox.log')
   196 
   203 
   197 @command('^blackbox',
   204 @command('^blackbox',
   198     [('l', 'limit', 10, _('the number of events to show')),
   205     [('l', 'limit', 10, _('the number of events to show')),
   199     ],
   206     ],