Mercurial > hg
view tests/test-issue612.t @ 32906:23b07333a8b2
tinyproxy: explicitly flush logged messages
On Windows, output streams are buffered when redirected to a file, and
TerminateProcess() apparently doesn't trigger a flush. This left
test-http-proxy.t missing part of the last line when it cat'd proxy.log[1].
Flushing stderr is all that is needed (on py27 anyway). I originally flushed
stdout too, but that added additional output to the log:
$ cat proxy.log
+ Accept: $LOCALIP (localhost)\r (esc)
+ Serving HTTP on 0.0.0.0 port 20810 ...\r (esc)
+ connect to localhost:$HGPORT\r (esc)
* - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
+ bye\r (esc)
+ connect to localhost:$HGPORT\r (esc)
* - - [*] "GET http://localhost:$HGPORT/?cmd=branchmap HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
+ bye\r (esc)
+ connect to localhost:$HGPORT\r (esc)
* - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - x-hgproto-1:0.1 0.2 comp=*zlib,none,bzip2 (glob)
+ bye\r (esc)
+ connect to localhost:$HGPORT\r (esc)
...
[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-April/096987.html
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 18 Jun 2017 21:31:53 -0400 |
parents | 2fc86d92c4a9 |
children | 4441705b7111 |
line wrap: on
line source
https://bz.mercurial-scm.org/612 $ hg init $ mkdir src $ echo a > src/a.c $ hg ci -Ama adding src/a.c $ hg mv src source moving src/a.c to source/a.c (glob) $ hg ci -Ammove $ hg co -C 0 1 files updated, 0 files merged, 1 files removed, 0 files unresolved $ echo new > src/a.c $ echo compiled > src/a.o $ hg ci -mupdate created new head $ hg status ? src/a.o $ hg merge merging src/a.c and source/a.c to source/a.c 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) $ hg status M source/a.c R src/a.c ? src/a.o