Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use cygwin at Windows XP.

There's problem with Mercurial, for example.

Say, I need to push my repo with several subrepos to the remote server. This operation takes about 20 seconds.

When I call hg from cmd.exe, I see all actions in real-time:

pushing subrepo ..... to .....
searching for changes

etc. Everything is fine.

But, when I call it from cygwin terminal, I type hg push, press Enter, and there's nothing echoed to the console for about 20 seconds, and then all the logs appear immediately.

Why is that, and how can I avoid that?

share|improve this question
    
The cygwin shell uses pipes to direct output which programs often assume are non-interactive (they don't see them as a TTY / console). The result is they often buffer output in 4k chunks for performance reasons. Have not seen a general solution to this. –  Brian Aug 4 '13 at 16:08
    
But, when I type, say, ping google.com, I see real-time action of it –  Dmitry Frank Aug 4 '13 at 17:14
    
Depends on the command / executable. Some always line buffer so won't be a problem. –  Brian Aug 4 '13 at 17:17
    
I use mercurial under cygwin, and I don't have the described problem. Is this a "native" Windows version of mercurial, or cygwin's version? If the former, try the latter. –  Heptite Aug 4 '13 at 19:57
    
This is a "native" Windows version, yes. It contains some useful features such as overlay icons and TortoiseHG GUI, cygwin's version seems not have them. Thanks for the suggestion, I'm out of my dev environment for several days, but I'll definitely try it later, anyway. –  Dmitry Frank Aug 4 '13 at 22:01

2 Answers 2

up vote 1 down vote accepted

I use mercurial under cygwin, and I don't have the described problem. Is this a "native" Windows version of mercurial, or cygwin's version? If the former, try the latter.

share|improve this answer

I know when implementing command line code in C/C++ this behavior can be controlled by the fflush() command to flush an output buffer, fclose() would do the same thing.

So, it's dependent on the program you're running and how often they flush().

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.