darcs

Issue 1822 Don't emit noise when stdio isn't a tty.

Title Don't emit noise when stdio isn't a tty.
Priority bug Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, jaredj, kowey, twb
Assigned To
Topics ProbablyEasy, UI

Created on 2010-04-19.10:16:12 by twb, last changed 2023-07-16.20:18:04 by bfrk.

Messages
msg10766 (view) Author: twb Date: 2010-04-19.10:16:11
This was caused by a "darcs record --all" invocation:

Anacron wrote:
> /etc/cron.daily/etckeeper:
> Reading pristine 104 done, 1108 queued. 0000006482-68e3535cd2ad1b9867a70fc31c620

This progress information should not be emitted unless stdio is a tty.
msg10833 (view) Author: kowey Date: 2010-04-26.18:31:27
This sounds like it could be easy to fix.  We have some general smarts
like this using the Haskeline library
msg14662 (view) Author: anjemz Date: 2011-08-14.15:31:21
Is this actually still a problem? 
AFAICT, the code in Progress.hs
appears to do the right thing.
And e.g. darcs get --lazy http://darcs.net > darcs.txt leaves no progress 
report in darcs.txt.
msg14668 (view) Author: twb Date: 2011-08-15.14:18:21
Alexander Njemz wrote:
> 
> Alexander Njemz <f.alexander.njemz@gmail.com> added the comment:
> 
> Is this actually still a problem? 
> AFAICT, the code in Progress.hs
> appears to do the right thing.
> And e.g. darcs get --lazy http://darcs.net > darcs.txt leaves no progress 
> report in darcs.txt.

I don't know offhand, I will try to find time to do some testing.

It'll likely be stderr (2) not stdout (1); and it'll only occur if the
operation takes a while, which wouldn't happen with a lazy get that
you already have cached.
msg17827 (view) Author: reilithion Date: 2014-11-16.21:20:52
This bug is still present as of the time of this comment. The code
responsible is in src/Darcs/Patch/Progress.hs and makes heavy use of
unsafePerformIO.
msg23207 (view) Author: bfrk Date: 2023-03-27.17:54:18
I agree that changing this is a good idea. Currently progress goes to 
stderr. I would like to make it go to stdout and disable it when that 
is not a terminal. With terminal-size >= 0.3.4 we can now more 
reliably detect that condition. Will send a patch.
msg23209 (view) Author: bfrk Date: 2023-03-27.18:42:42
See Patch2291
History
Date User Action Args
2010-04-19 10:16:12twbcreate
2010-04-26 18:31:29koweysetpriority: bug
status: unknown -> needs-implementation
topic: + ProbablyEasy, UI
messages: + msg10833
nosy: + kowey, jaredj
2011-08-14 15:31:22anjemzsetmessages: + msg14662
2011-08-15 14:18:22twbsetmessages: + msg14668
2012-02-24 05:25:51mndrixsetnosy: + mndrix
2014-11-16 21:20:53reilithionsetmessages: + msg17827
2014-11-17 15:56:57mndrixsetnosy: - mndrix
2023-03-27 17:54:20bfrksetmessages: + msg23207
2023-03-27 18:42:42bfrksetstatus: needs-implementation -> has-patch
messages: + msg23209
2023-07-16 20:18:04bfrksetstatus: has-patch -> resolved