hgext/blackbox.py
changeset 36607 c6061cadb400
parent 35727 05c70675e5b9
child 37120 a8a902d7176e
equal deleted inserted replaced
36606:4de15c54e59f 36607:c6061cadb400
    47     encoding,
    47     encoding,
    48     registrar,
    48     registrar,
    49     ui as uimod,
    49     ui as uimod,
    50     util,
    50     util,
    51 )
    51 )
       
    52 from mercurial.utils import dateutil
    52 
    53 
    53 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
    54 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
    54 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
    55 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
    55 # be specifying the version(s) of Mercurial they are tested with, or
    56 # be specifying the version(s) of Mercurial they are tested with, or
    56 # leave the attribute unspecified.
    57 # leave the attribute unspecified.
   162             if getattr(ui, '_bbinlog', False):
   163             if getattr(ui, '_bbinlog', False):
   163                 # recursion and failure guard
   164                 # recursion and failure guard
   164                 return
   165                 return
   165             ui._bbinlog = True
   166             ui._bbinlog = True
   166             default = self.configdate('devel', 'default-date')
   167             default = self.configdate('devel', 'default-date')
   167             date = util.datestr(default, '%Y/%m/%d %H:%M:%S')
   168             date = dateutil.datestr(default, '%Y/%m/%d %H:%M:%S')
   168             user = util.getuser()
   169             user = util.getuser()
   169             pid = '%d' % util.getpid()
   170             pid = '%d' % util.getpid()
   170             formattedmsg = msg[0] % msg[1:]
   171             formattedmsg = msg[0] % msg[1:]
   171             rev = '(unknown)'
   172             rev = '(unknown)'
   172             changed = ''
   173             changed = ''