Mercurial > hg
comparison tests/run-tests.py @ 39909:0f8ff3ff5d5c
run-tests: flush output stream before prompting to accept changes
With py3 on Windows, the prompt to accept changes in an --interactive run wasn't
showing up until after the choice was read from stdin.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 29 Sep 2018 20:33:52 -0400 |
parents | 38d51371792b |
children | 1039404c5e1d |
comparison
equal
deleted
inserted
replaced
39908:d70e620ee8c9 | 39909:0f8ff3ff5d5c |
---|---|
1873 self.stream.write( | 1873 self.stream.write( |
1874 'Reference output has changed (run again to prompt ' | 1874 'Reference output has changed (run again to prompt ' |
1875 'changes)') | 1875 'changes)') |
1876 else: | 1876 else: |
1877 self.stream.write('Accept this change? [n] ') | 1877 self.stream.write('Accept this change? [n] ') |
1878 self.stream.flush() | |
1878 answer = sys.stdin.readline().strip() | 1879 answer = sys.stdin.readline().strip() |
1879 if answer.lower() in ('y', 'yes'): | 1880 if answer.lower() in ('y', 'yes'): |
1880 if test.path.endswith(b'.t'): | 1881 if test.path.endswith(b'.t'): |
1881 rename(test.errpath, test.path) | 1882 rename(test.errpath, test.path) |
1882 else: | 1883 else: |