# HG changeset patch # User Valentin Gatien-Baron # Date 2022-04-01 16:46:58 # Node ID 91a60031aba28f1a3fce8b21a4fce65ecd5d0826 # Parent d4752aeb20f1f827d10ee0b877713de1a4e31c89 dispatch: fix silly blackbox entries when hg is interrupted When hg is interrupted, it creates ui.log like this: 1970/01/01 00:00:00 user @0000000000000000000000000000000000000000 (62488)> killed! exited 255 after 1.78 seconds This is due to a scoping problem: two different uses of the name "msg" collide. So rename one of them. Differential Revision: https://phab.mercurial-scm.org/D12427 diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -287,7 +287,7 @@ def _rundispatch(req): ferr.write(inst.format()) return -1 - msg = _formatargs(req.args) + formattedargs = _formatargs(req.args) starttime = util.timer() ret = 1 # default of Python exit code on unhandled exception try: @@ -326,7 +326,7 @@ def _rundispatch(req): req.ui.log( b"commandfinish", b"%s exited %d after %0.2f seconds\n", - msg, + formattedargs, return_code, duration, return_code=return_code,