perf: fix perfrevlogrevisions --reverse
Currently, 'endrev' equals `len(revlog)`, a revision that does not exist.
When asking for the reverse order, the arguments passed to xrange are
`xrange(len(revlog), startrev)` which then crash.
We need to offset 'endrev' by one so we don't crash anymore. Also, we offset
'startrev' to ensure we get the same number of revisions with and without the
`--reverse` option.
Differential Revision: https://phab.mercurial-scm.org/D5228
procutil: import concerns about creationflags on Windows from D1701
I don't have the need anymore for the change in D1701 nor the time to
investigate the changes on all supported Windows platforms.
I import the stuff I learned on D1701 in the `runbgcommand` so the next people
working on it can starts from there.
Differential Revision: https://phab.mercurial-scm.org/D5229
localrepo: extract loading of hgrc files to standalone function
Various 3rd party extensions supplement where per-repo config data
lives. Looking at their sources, they resort to unorthodox means to
inject the config data. And the way they do it is susceptible to
corner cases. e.g. not processing automatic extension loads,
not reacting to new or disabled extensions in configs, etc.
This commit extracts the core logic of loading hgrc files into
a standalone function so there is a clear function that can be
monkeypatched to inject per-repo config data at repository open
time.
Differential Revision: https://phab.mercurial-scm.org/D5221
revsets: make bookmark/named('re:nonexistent') not abort (
issue6018) (BC)
Foozy documented the differences between revsets branch(), tag(),
bookmark(), and named() in
eeb5d5ab14a6 (revset: raise RepoLookupError
to make present() predicate continue the query, 2015-01-31). He seemed
to want tag() to change behavior to not error out on non-matching
regular expressions. I think it's instead bookmark() and named() that
should not error out. So that's what this patch does.
Differential Revision: https://phab.mercurial-scm.org/D5220