Mercurial > public > mercurial-scm > hg-stable
diff tests/run-tests.py @ 22361:eb6adf750954
run-tests: make --interactive work with --view
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 31 Aug 2014 12:22:44 +0200 |
parents | 102f0e926668 |
children | c42e69268f5b |
line wrap: on
line diff
--- a/tests/run-tests.py Sun Aug 31 11:11:42 2014 +0200 +++ b/tests/run-tests.py Sun Aug 31 12:22:44 2014 +0200 @@ -1201,18 +1201,18 @@ self.stream.write(line) self.stream.flush() - # handle interactive prompt without releasing iolock - if self._options.interactive: - self.stream.write('Accept this change? [n] ') - answer = sys.stdin.readline().strip() - if answer.lower() in ('y', 'yes'): - if test.name.endswith('.t'): - rename(test.errpath, test.path) - else: - rename(test.errpath, '%s.out' % test.path) - accepted = True - if not accepted and not failed: - self.faildata[test.name] = ''.join(lines) + # handle interactive prompt without releasing iolock + if self._options.interactive: + self.stream.write('Accept this change? [n] ') + answer = sys.stdin.readline().strip() + if answer.lower() in ('y', 'yes'): + if test.name.endswith('.t'): + rename(test.errpath, test.path) + else: + rename(test.errpath, '%s.out' % test.path) + accepted = True + if not accepted and not failed: + self.faildata[test.name] = ''.join(lines) iolock.release() return accepted