# HG changeset patch # User Gregory Szorc # Date 2015-08-22 17:37:38 # Node ID 05e7f57c74ac5b556b49870af86f61aa0c54babb # Parent 8107c308ff22319f503b9d2f2f86beb7d1aed7fc hghave: remove quiet option The --quiet flag appears to be unused. Kill it. diff --git a/tests/hghave b/tests/hghave --- a/tests/hghave +++ b/tests/hghave @@ -30,10 +30,8 @@ parser.add_option("--test-features", act help="test available features") parser.add_option("--list-features", action="store_true", help="list available features") -parser.add_option("-q", "--quiet", action="store_true", - help="check features silently") -def _loadaddon(quiet): +def _loadaddon(): if 'TESTDIR' in os.environ: # loading from '.' isn't needed, because `hghave` should be # running at TESTTMP in this case @@ -48,15 +46,14 @@ def _loadaddon(quiet): try: import hghaveaddon except BaseException, inst: - if not quiet: - sys.stderr.write('failed to import hghaveaddon.py from %r: %s\n' - % (path, inst)) + sys.stderr.write('failed to import hghaveaddon.py from %r: %s\n' + % (path, inst)) sys.exit(2) sys.path.pop(0) if __name__ == '__main__': options, args = parser.parse_args() - _loadaddon(options.quiet) + _loadaddon() if options.list_features: list_features() sys.exit(0) @@ -64,4 +61,4 @@ if __name__ == '__main__': if options.test_features: sys.exit(test_features()) - hghave.require(args, options.quiet) + hghave.require(args) diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -47,17 +47,16 @@ def checkfeatures(features): return result -def require(features, quiet=False): +def require(features): """Require that features are available, exiting if not.""" result = checkfeatures(features) - if not quiet: - for missing in result['missing']: - sys.stderr.write('skipped: unknown feature: %s\n' % missing) - for msg in result['skipped']: - sys.stderr.write('skipped: %s\n' % msg) - for msg in result['error']: - sys.stderr.write('%s\n' % msg) + for missing in result['missing']: + sys.stderr.write('skipped: unknown feature: %s\n' % missing) + for msg in result['skipped']: + sys.stderr.write('skipped: %s\n' % msg) + for msg in result['error']: + sys.stderr.write('%s\n' % msg) if result['missing']: sys.exit(2)