remotenames: remove unneeded sorted() from revset implementation
The order is constrained by the subset.
remotenames: inline _parseargs() into _revsetutil()
The _parseargs() function gets quite simple, and the 0/1 loop can be rewritten
as "if".
repo: create changectx in a single place in localrepo.__getitem__
Differential Revision: https://phab.mercurial-scm.org/D4885
repo: remove the last few "pass" statements in localrepo.__getitem__
In case of IndexError or LookupError, we used "pass" statements and
fell through to the end of localrepo.__getitem__. I find the pass
statements easy to miss. Consistently raising and catching exceptions
seems easier to follow.
Oh -- and I didn't plan this before I wrote the above -- that probably
also lets us reuse the "return context.changectx(self, rev, node)" in
a later patch.
Differential Revision: https://phab.mercurial-scm.org/D4884
filectx: correct docstring about "changeid"
The changeid argument must be a revnum (basefile.rev() is defined as
"return self._changeid"), so fix the lie in the docstring. It seems to
have been incorrect for at least 10 years (I didn't check further
back).
Differential Revision: https://phab.mercurial-scm.org/D4881
context: drop incorrect and superfluous docstring
It's been incorrect at least since
8b86acc7aa64 (context: drop support
for looking up context by ambiguous changeid (API), 2018-04-28).
Differential Revision: https://phab.mercurial-scm.org/D4880