2 patches for repository http://darcs.net/screened:
patch e3c419a74904ab499e020df869ce09ded0ce1976
Author: Ben Franksen <ben.franksen@online.de>
Date: Sun Mar 12 09:57:11 CET 2023
* make --timings more useful
It now prints timestamps relative to program start (more precisely: when
setTimingsMode is called) in a suitable format (mm:ss.microseconds).
patch dc1f597e0c48fec5a415d6e5f0bcd342f5717331
Author: Ben Franksen <ben.franksen@online.de>
Date: Sun Mar 12 10:55:16 CET 2023
* progress reporting: fix for non-native Windows terminals and simplify
The fix is to not rely on hIsTerminalDevice which does not work correctly on
Windows with non-native terminals, such as MinTTY used in MSYS and Cygwin
environments. Instead decide based on the result of the 'size' procedure
from terminal-size. Also, don't print any progress messages if that returns
Nothing, instead of falling back to putStrLn.
The simplification is to print progress messages to stdout rather than
stderr and to never add timestamps. Rationale: timestamps are for debugging
and useless in progress reports; whereas progress messages are an indication
to regular users using an interactive shell.
Note that if stdout is redirected then it is no longer a terminal device and
therefore progress messages are automatically turned off, which incidentally
fixes issue1822. This is important when you run darcs commands from a cron
job: in that case you do NOT want to redirect stderr, so that the system
sends you an email when something goes wrong.
Attachments
|