diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3000,7 +3000,6 @@ globalopts = [ ('', 'encoding', encoding.encoding, _('set the charset encoding')), ('', 'encodingmode', encoding.encodingmode, _('set the charset encoding mode')), - ('', 'lsprof', None, _('print improved command execution profile')), ('', 'traceback', None, _('print traceback on exception')), ('', 'time', None, _('time how long the command takes')), ('', 'profile', None, _('print command execution profile')), diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -379,25 +379,6 @@ def _runcommand(ui, options, cmd, cmdfun raise error.ParseError(cmd, _("invalid arguments")) if options['profile']: - import hotshot, hotshot.stats - prof = hotshot.Profile("hg.prof") - try: - try: - return prof.runcall(checkargs) - except: - try: - ui.warn(_('exception raised - generating ' - 'profile anyway\n')) - except: - pass - raise - finally: - prof.close() - stats = hotshot.stats.load("hg.prof") - stats.strip_dirs() - stats.sort_stats('time', 'calls') - stats.print_stats(40) - elif options['lsprof']: try: from mercurial import lsprof except ImportError: diff --git a/tests/test-debugcomplete.out b/tests/test-debugcomplete.out --- a/tests/test-debugcomplete.out +++ b/tests/test-debugcomplete.out @@ -97,7 +97,6 @@ rawcommit --encoding --encodingmode --help ---lsprof --noninteractive --profile --quiet @@ -127,7 +126,6 @@ rawcommit --errorlog --help --ipv6 ---lsprof --name --noninteractive --pid-file diff --git a/tests/test-extension.out b/tests/test-extension.out --- a/tests/test-extension.out +++ b/tests/test-extension.out @@ -48,7 +48,6 @@ global options: --debugger start debugger --encoding set the charset encoding (default: ascii) --encodingmode set the charset encoding mode (default: strict) - --lsprof print improved command execution profile --traceback print traceback on exception --time time how long the command takes --profile print command execution profile diff --git a/tests/test-profile b/tests/test-profile --- a/tests/test-profile +++ b/tests/test-profile @@ -4,12 +4,6 @@ echo % test --time hg --time help -q help 2>&1 | grep Time > /dev/null || echo --time failed echo % test --profile -if "$TESTDIR/hghave" -q hotshot; then - # hotshot might be missing for licensing issues - hg --profile help -q help 2>&1 | grep ncalls > /dev/null || echo --profile failed +if "$TESTDIR/hghave" -q lsprof; then + hg --profile help -q help 2>&1 | grep CallCount > /dev/null || echo --profile failed fi - -echo % test --lsprof -if "$TESTDIR/hghave" -q lsprof; then - hg --lsprof help -q help 2>&1 | grep CallCount > /dev/null || echo --lsprof failed -fi diff --git a/tests/test-profile.out b/tests/test-profile.out --- a/tests/test-profile.out +++ b/tests/test-profile.out @@ -1,3 +1,2 @@ % test --time % test --profile -% test --lsprof