profiling: document the py-spy value for `profiling.type`
The feature was not visible otherwise.
unionrepo: fix mismatches with revlog classes
This is a subset of
cfd30df0f8e4, applied to `unionrepository`. There are none
of the `write()` method overrides here, like `bundlerepository`.
With these changes, pytype flags the `unionrevlog` constructor:
File "/mnt/c/Users/Matt/hg/mercurial/unionrepo.py", line 55, in __init__:
No attribute '_revlog' on mercurial.changelog.changelog [attribute-error]
Called from (traceback):
line 207, in __init__
File "/mnt/c/Users/Matt/hg/mercurial/unionrepo.py", line 55, in __init__:
No attribute '_revlog' on mercurial.revlog.revlog [attribute-error]
Called from (traceback):
line 232, in __init__
But it turns out that both `changelog.changelog` and `revlog.revlog` do have a
`target` attribute, so they wouldn't trip over this. It seems weird that the
second caller to be flagged is passing the private `_revlog`, but maybe that's
how it needs to be.
typing: make `unionrepository` subclass `localrepository` while type checking
This is the same change as
9d4ad05bc91c made for `bundlerepository`, for the
same reasons.
Also, add a comment here to suppress the PyCharm warning that the superclass
constructor is not called, that is new now that there's a simulated superclass.
That lack of a call is by design- `makeunionrepository()` does magic that
PyCharm isn't aware of. But PyCharm has been better at catching problems than
pytype in a lot of cases, so I'd like to reduce the bogus things it flags, to
make the real issues stand out.