diff --git a/mercurial/profiling.py b/mercurial/profiling.py --- a/mercurial/profiling.py +++ b/mercurial/profiling.py @@ -204,7 +204,7 @@ If the profiler was already started, this has no effect.""" if not self._entered: - raise error.ProgrammingError() + raise error.ProgrammingError(b'use a context manager to start') if self._started: return self._started = True