bitmanipulation: fix undefined behavior in bit shift in getbe32
OSS-Fuzz caught this in its ubsan mode[0]. I'm not worried about a
security issue here because in practice this should work out the way
we naively expected, we're just making things explicit to the
compiler with the casts.
0: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8876
Differential Revision: https://phab.mercurial-scm.org/D3729
lazymanifest: don't crash when out of memory (
issue5916)
self->lines can be NULL if we failed to allocate memory for it.
cext: stop worrying and love the free(NULL)
There is no need to check for a NULL pointer before calling free since
free(NULL) is defined by C standards as a no-op. Lots of software relies on
this behavior so it is completely safe to call even on the most obscure of
systems.
templatefilters: undeprecate hgdate
See the previous patch for why.
Backed out changeset
0fe65bb7e160
templater: restore the original string format of {date}
Unfortunately, python-hglib relies on that. I could fix python-hglib, but
there would be other tools that take a decimal separator as the separator
of unixtime and tzoffset.
The showfmt is set per instance since new code uses '%d %d' format by default.
hgweb: insist http_status value is a sysstr
My previous change was extremely confusing to figure out, because I
thought I was looking at a client-side problem. For the low cost of an
isinstance assert, we can make those errors not happen in the future.
Differential Revision: https://phab.mercurial-scm.org/D3727
hgweb: pass a sysstr to low-level _start_response method
This fixes a regression in Python 3 support introduced in
7de7bd407251
on the stable branch. We're so early in do_hgweb that I don't see any
especially better choices than this.
Differential Revision: https://phab.mercurial-scm.org/D3726
tests: fix printenv script on Python 3
Differential Revision: https://phab.mercurial-scm.org/D3725