perf: add a way to benchmark `dirstate.status`
Getting more details about time spend in this specific internal bit is
meaningful.
largefiles: delete obsolete and unused repo.push()
The function was removed from localrepo in
4d52e6eb98ea (locarepo:
remove the `push` method (API), 2014-09-25).
Differential Revision: https://phab.mercurial-scm.org/D7174
censor: document that some commands simply ignore censored data
I can't see a benefit for hg grep to ever error out early when it
encounters censored data.
grep: warn on censored revisions instead of erroring out
We need most of the grep logic to go through in case we encounter a
censored revision, so we just return a None body for a censored node,
and we stop just short of trying to record matches with the contents
of that censored body. The other parts such as recording that the
censored file has been considered at this revision needs to go into
the proper dicts.
I have also gotten weary of all the abbreviations, so while I did a
small refactor to move the file-data-getting operation into a common
function, I also expanded the abbreviations of the relevant variables
within this little function. Hopefully some day this helps someone
figure out what all the abbreviations mean.
Although the censoring docs currently state that some commands error
out or are ignored depending on the `censor.policy` config, I cannot
see a benefit for grep to ever stop dead in its tracks when a censored
revision is encountered. I will also amend the docs to indicate that
some commands, such as grep, unconditionally ignore censored
revisions.
py3: enable legacy fs encoding to fix filename compatibility on Windows
This patch is untested. I just followed the instruction:
https://docs.python.org/3/whatsnew/3.6.html#pep-529-change-windows-filesystem-encoding-to-utf-8
rust-cpython: remove useless PyResult<> from leak_immutable()
The caller should know if the shared data is mutably borrowed or not.
rust-cpython: drop manual management of mutably_borrowed
RefCell::borrow() should guarantee there's no mutable borrow.
As a follow up, maybe PySharedState can be a pure data structure + function.
Most ref-sharing business has already been moved to PySharedRef* and PyLeaked*.