hghave: avoid a deadlock reading the child process's output
The output of `pylint` is voluminous enough that it fills the buffer on Windows,
and waited for the parent to read it out. But the parent was waiting on the
child to exit.
I'm not sure what the intent of setting `ret = -1` in the exception handler just
above this was...
lfs: bypass wrapped functions when reposetup() hasn't been called (
issue5902)
There are only a handful of methods that access repo attributes that are applied
in reposetup(). The `diff` test covers all of the commands that call
scmutil.prefetchfiles(). Along the way, I saw that adding files and upgrading
the repo format were also problems (also tested here).
I don't think running `hg serve` through the commandserver is sane, but I
conditionalized both the capabilities and the wsgirequest handler because it's
trivially correct. It doesn't look like there has ever been a caller of
candownload(), so there's no test for that path.
The upload case isn't testable, because uploadblobs() bails if there are no
pointers. The requirement should be added any time pointers are introduced, and
that would force the extension to be loaded specifically for the repo. This
covers `debuglfsupload`, the pre-push hook (which isn't set until the repo is
promoted to LFS), and uploadblobsfromrevs(), which can be called by other
extensions.
I think readfromstore() and writetostore() are only reachable as a flag
processor for revlog.REVIDX_EXTSTORED, and a requirement is added as soon as
that is seen, so I don't think those are a problem.
revlog: disallow setting uncompressed length to None
Backed out changeset
a4942675de6b
unionrepo: fill in uncompressed length of revlog entry
It can be either -1 or a valid length, but shouldn't be None. IIUC, we can
simply trust the length retrieved from the revlog to be overlaid. I don't
bother thinking whether the compressed length can be copied as well. We'll
need to fix it later.
fuzz: add clean target
Differential Revision: https://phab.mercurial-scm.org/D3677
fuzzutil: make it possible to use absl when C++17 isn't supported
Differential Revision: https://phab.mercurial-scm.org/D3676
fuzz: extract some common utilities and use modern C++ idioms
Alex Gaynor suggested we should probably copy the left and right sides
of diffs to new blocks so we can detect over-reads in the diffing
code, and I agree. Once I got into that, I realized we should do
things with C++17 idioms rather than keep using malloc() and
free(). This change is the result. I tried to split it more than this
and failed.
Everything still compiles and works in the oss-fuzz container, so I
think we can count on C++17 being available!
Differential Revision: https://phab.mercurial-scm.org/D3675
tests: update fuzzer tests to include both fuzzers
Differential Revision: https://phab.mercurial-scm.org/D3674