Submitter | timeless |
---|---|
Date | May 16, 2016, 5:56 p.m. |
Message ID | <CAAKMeYi2UkOyG3OarAgh5H62JSPzhDYZ6NQqU2pPYmDcf03P5A@mail.gmail.com> |
Download | mbox | patch |
Permalink | /patch/15150/ |
State | Changes Requested, archived |
Headers | show |
Comments
On Mon, 16 May 2016 10:56:59 -0700, timeless wrote: > These tests fail w/o that change: > test-hgweb-bundle.t > test-hgweb-removed.t > test-hgweb-empty.t > test-hgweb-raw.t > test-hgweb-descend-empties.t > test-hgwebdirsym.t > test-hgweb-filelog.t > test-mq-qclone-http.t > test-hgweb-diffs.t > test-share.t > test-hgweb-symrev.t > test-hgwebdir.t > test-obsolete.t > test-largefiles.t > > I think the answer is that even though the py2 print statement isn't > documented to call flush, it must be calling flush. > > The command I'm using: > ./run-tests.py --with-hg=~/bin/hg -j120 $X > > (Where X is that set of files) > > I guess that change should be split into a distinct commit. > > Sample failure output: > --- test-hgweb-bundle.t > +++ test-hgweb-bundle.t.err > @@ -28,10 +28,10 @@ > Ensure we're serving from the bundle > > $ (get-with-headers.py localhost:$HGPORT 'file/tip/?style=raw') > - 200 Script output follows > - That's because you use different io objects without flushing. The following code works for me, thought it is ugly. sys.stdout.flush() sys.stdout.buffer.write(data) sys.stdout.buffer.flush() I don't know the Python3 way, but we'd probably better use either text or binary io consistently.
Patch
--- test-hgweb-bundle.t +++ test-hgweb-bundle.t.err @@ -28,10 +28,10 @@ Ensure we're serving from the bundle $ (get-with-headers.py localhost:$HGPORT 'file/tip/?style=raw') - 200 Script output follows - -rw-r--r-- 2 bar -rw-r--r-- 2 foo + 200 Script output follows +