hgext/logtoprocess.py
changeset 40401 6bd477ee7294
parent 39926 c4a3d3c67c4f
child 40499 2e09d1cae90c
equal deleted inserted replaced
40400:db0dba2d157d 40401:6bd477ee7294
   111             if script:
   111             if script:
   112                 if msg:
   112                 if msg:
   113                     # try to format the log message given the remaining
   113                     # try to format the log message given the remaining
   114                     # arguments
   114                     # arguments
   115                     try:
   115                     try:
   116                         # Python string formatting with % either uses a
   116                         # Format the message as blackbox does
   117                         # dictionary *or* tuple, but not both. If we have
   117                         formatted = msg[0] % msg[1:]
   118                         # keyword options, assume we need a mapping.
       
   119                         formatted = msg[0] % (opts or msg[1:])
       
   120                     except (TypeError, KeyError):
   118                     except (TypeError, KeyError):
   121                         # Failed to apply the arguments, ignore
   119                         # Failed to apply the arguments, ignore
   122                         formatted = msg[0]
   120                         formatted = msg[0]
   123                     messages = (formatted,) + msg[1:]
   121                     messages = (formatted,) + msg[1:]
   124                 else:
   122                 else: