Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Jun 2018 15:45:16 -0700] rev 38315
graft: use context manager for config override
Differential Revision: https://phab.mercurial-scm.org/D3738
Augie Fackler <augie@google.com> [Thu, 14 Jun 2018 11:49:10 -0400] rev 38314
tests: suppress read(-1) -> '' calls in fileobjectobserver
This stabilizes the test output of the low-level wireproto tests
between Python 2 and 3. I don't feel great about this change, but
otherwise we get a ton of extra read(-1) output on Python 3, and this
feels like a more sustainable solution.
Bonus: test-ssh-proto-unbundle.t now passes on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D3733
Augie Fackler <augie@google.com> [Thu, 14 Jun 2018 11:47:51 -0400] rev 38313
debugcommands: work around logiofd being a pipe and unseekable
This was breaking in our Python 3 build, but not Python 2. I don't
know how it ever worked in Python 2, but this passes on both.
Differential Revision: https://phab.mercurial-scm.org/D3732
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 13 Jun 2018 22:51:08 +0530] rev 38312
py3: replace `unicode` with pycompat.unicode
unicode() is not available on Python 3 and throws a NameError because unicodes
are now default str() on py3.
Differential Revision: https://phab.mercurial-scm.org/D3708
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 15 Jun 2018 02:07:39 +0530] rev 38311
cmdutil: say that `graft --stop` stops the graft instead of aborting
I am going to add a --abort flag to graft soon, so we make sure we differentiate
between the what --stop flag does and what --abort does and don't use the words
interchangeably.
Differential Revision: https://phab.mercurial-scm.org/D3735
Augie Fackler <augie@google.com> [Thu, 14 Jun 2018 16:51:39 -0400] rev 38310
py3: two more passing tests from the ratchet in buildbot
Differential Revision: https://phab.mercurial-scm.org/D3736
Yuya Nishihara <yuya@tcha.org> [Thu, 14 Jun 2018 20:25:51 +0900] rev 38309
bdiff: one more safe call of bdiff_freehunks(NULL)
Yuya Nishihara <yuya@tcha.org> [Thu, 14 Jun 2018 20:25:16 +0900] rev 38308
bdiff: document that bdiff_freehunks() accepts NULL
blocks() of cext/bdiff.c may pass NULL on OOM.
Sune Foldager <cryo@cyanite.org> [Thu, 14 Jun 2018 13:44:42 +0200] rev 38307
hgweb: propagate http headers from ErrorResponse for web interface commands
This makes it possible for e.g. authorization hooks to provide appropriate
headers to make the web browser ask for credentials.
It's done in the same way as the existing code in wireprotoserver.py.
Yuya Nishihara <yuya@tcha.org> [Thu, 14 Jun 2018 20:29:27 +0900] rev 38306
py3: fix map() use in templatekw.showpredecessors()
Now it matters since hybrid.tobool() no longer consumes the generator.
Yuya Nishihara <yuya@tcha.org> [Thu, 14 Jun 2018 20:09:54 +0900] rev 38305
merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Wed, 13 Jun 2018 14:28:39 -0700] rev 38304
templatefilters: rename commonprefix to commondir
Two reasons:
* It makes it clearer that it's not a generic common string
prefix (e.g. commonprefix(["bar", "baz"]) is not "ba", but "")
* If we ever want a filter for generic common string prefix,
then the name is now available for that.
"commondir" does not describe the prefix-ness, however. I'm happy to
rename it "commondirprefix" or "commonprefixdir" if others prefer.
Differential Revision: https://phab.mercurial-scm.org/D3731
Augie Fackler <augie@google.com> [Wed, 13 Jun 2018 10:24:44 -0400] rev 38303
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
Josef 'Jeff' Sipek <jeffpc@josefsipek.net> [Wed, 13 Jun 2018 10:41:20 -0400] rev 38302
lazymanifest: don't crash when out of memory (
issue5916)
self->lines can be NULL if we failed to allocate memory for it.
Josef 'Jeff' Sipek <jeffpc@josefsipek.net> [Wed, 13 Jun 2018 10:37:39 -0400] rev 38301
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.
Yuya Nishihara <yuya@tcha.org> [Wed, 13 Jun 2018 21:58:42 +0900] rev 38300
templatefilters: undeprecate hgdate
See the previous patch for why.
Backed out changeset
0fe65bb7e160
Yuya Nishihara <yuya@tcha.org> [Wed, 13 Jun 2018 21:57:24 +0900] rev 38299
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.
Augie Fackler <augie@google.com> [Tue, 12 Jun 2018 20:43:56 -0400] rev 38298
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
Augie Fackler <augie@google.com> [Tue, 12 Jun 2018 20:42:42 -0400] rev 38297
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
Augie Fackler <augie@google.com> [Tue, 12 Jun 2018 18:49:35 -0400] rev 38296
tests: fix printenv script on Python 3
Differential Revision: https://phab.mercurial-scm.org/D3725
Augie Fackler <augie@google.com> [Tue, 12 Jun 2018 18:49:22 -0400] rev 38295
cvsps: port changeset __repr__ to py3
This appears to be unused except as a debugging aid, as it didn't
break until I added a debug print() in service of the previous
fix. Sigh.
Differential Revision: https://phab.mercurial-scm.org/D3724
Augie Fackler <augie@google.com> [Tue, 12 Jun 2018 18:24:25 -0400] rev 38294
cvsps: avoid comparison between None and a tuple in date sorting
Avoids badness on Python 3. I had to figure out which entries in this
object *could* be None experimentally, but I think I've got them all
now.
Differential Revision: https://phab.mercurial-scm.org/D3723
Augie Fackler <augie@google.com> [Tue, 12 Jun 2018 18:21:41 -0400] rev 38293
py3: buildbot informs me we have two new passing tests
Differential Revision: https://phab.mercurial-scm.org/D3722
Augie Fackler <augie@google.com> [Sun, 20 May 2018 23:05:18 -0400] rev 38292
tests: fix test-patch.t on pickier /bin/sh implementations
This is a graft of
0b39edeff033 and
f44306940c94 from default because
I'm tired of seeing the FreeBSD build be red on stable. See those
revisions for details on what's going on here.
Jun Wu <quark@fb.com> [Tue, 12 Jun 2018 12:41:09 -0700] rev 38291
commandserver: close server's fds explicitly from a worker
The forked worker does not need to accept connections from the server's
socket fd. So let's just close them explicitly to avoid surprises.
Differential Revision: https://phab.mercurial-scm.org/D3720
Boris Feld <boris.feld@octobus.net> [Tue, 12 Jun 2018 23:04:27 +0200] rev 38290
run-tests: restrict the test cases allowed characters
Most test cases in core and in extension only use `A-Za-z0-9-` but a few tests
in extensions also have a `.` in their test cases names. Also add a `_` to
allow all kind of case naming format.
Differential Revision: https://phab.mercurial-scm.org/D3721
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Jun 2018 13:34:47 +0900] rev 38289
templater: abstract truth testing to fix {if(list_of_empty_strings)}
Non-empty list should always be True even if it's stringified to ''. Spotted
by Martin von Zweigbergk.
Yuya Nishihara <yuya@tcha.org> [Tue, 12 Jun 2018 23:17:38 +0900] rev 38288
show: stringify filtered list of tags before testing emptiness
`names % "{ifeq(name, 'tip', '', name)}"}"` may return [''], which shouldn't
be falsy, but it is thanks to a templater bug. This patch converts [''] to ''
before testing truthness.
Yuya Nishihara <yuya@tcha.org> [Sat, 24 Mar 2018 18:03:23 +0900] rev 38287
templatefilters: deprecate hgdate as {date|hgdate} is the default format
Yuya Nishihara <yuya@tcha.org> [Sat, 24 Mar 2018 17:59:19 +0900] rev 38286
templater: make date wrapper support dot/map operations
No idea if it will be useful, but it just works.