This is an archive of the discontinued Mercurial Phabricator instance.

ui: add option to timestamp status and diagnostic messages
ClosedPublic

Authored by joerg.sonnenberger on Jun 18 2020, 9:13 AM.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

durin42 added inline comments.
mercurial/configitems.py
1387

maybe timestamp-output?

How does this interact with a command that uses the progress bar? Maybe add a check for that in test-progress.t?

pulkit added a subscriber: pulkit.Jun 25 2020, 10:56 AM
pulkit added inline comments.
mercurial/ui.py
1745

Any reason why we are passing self.showtimestamp when it can be accessed directly in self._writemsg?

mercurial/ui.py
1745

_writemsg is also used by other functions, e.g. prompt, getpass etc. I'm not sure we want to timestamp those, they certainly don't apply to my use-case.

pulkit added inline comments.Jun 29 2020, 4:46 AM
mercurial/ui.py
1745

Hm, in that case we can check the type in self_writemsg.

if type in set(['status', 'note', 'warning', 'error']):
    ....
pulkit accepted this revision.Jun 29 2020, 2:20 PM
This revision is now accepted and ready to land.Jun 29 2020, 2:20 PM