hgmanpage: fix grammar
remove 's's from places where they don't belong
insert the preposition 'in'
profiling: allow logging profile to the blackbox
This allows specifying '--config profiling.output=blackbox' which will log the
profile output to the blackbox (if enabled). This is useful for doing profiling
on the server since it allows us to record the command, it's result, any
exceptions, and it's profile, all in one spot. And we get log rotation for
free.
ui: change default path fallback mechanism (
issue4796)
The previous paths API code always fell back to the default path. This
was wrong because if a requested path doesn't exist, that should error.
Only if no path was requested should we fall back to the default.
As part of implementing the test case for issue 4796, it was discovered
that the "repository does not exist" error message raised by
localrepository.__init__ wasn't being seen because the paths API
validates paths before localrepository.__init__ was being called.
The exception and error message from localrepository.__init__ has
been introduced to getpath(). This necessitated rewriting
expandpath() both to catch the exception and to have proper
default fallback.
This code is more complicated than I'd like. But making all tests pass
was a big chore. As more code moves to getpath(), there will likely be
opportunities to improve things a bit.
templater: catch regexp error at sub() function
This patch splits re.sub() into re.compile() and sub() so that it can
distinguish which argument causes re.error.
graphmod: compute slow revset query once prior to reachableroots (
issue4782)
Because revsets query is evaluated lazily, "list(revs)" may take long for
complicated query. So we shouldn't iterate revs many times. This patch is the
easiest workaround for the
issue4782. We could introduce more aggressive
caching, but it wouldn't be as fast as the simple baseset operation.
Gregory Szorc said "this makes `hg wip` on my Firefox clone ~4x faster than
3.5.1 (~6.5s to ~1.5s). This is after a regression in @ to ~45s."
profiling: add config option for enabling profiling
Previously you could only enable profiling via the --profile option. This is
awkward when trying to debug a server side operation. Let's add a config option
to enable profiling.
In the future, this could be extended to allow profiling a certain percentage of
operations (and potentially reporting that information to an external service).
blackbox: add pid to output
This adds the process id to the line header for the blackbox output. This is
useful for distinguishing processes when using the blackbox on a server and many
processes are writing to the blackbox at once.