Sat, 14 May 2016 19:46:18 +0900 revset: factor out reverse flag of sort() key
Yuya Nishihara <yuya@tcha.org> [Sat, 14 May 2016 19:46:18 +0900] rev 29264
revset: factor out reverse flag of sort() key Prepares for making a table of sort keys. This assumes 'k' has at least one character, which should be guaranteed by keys.split().
Sat, 28 May 2016 12:29:59 -0700 tests: don't save host fingerprints in hgrc
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 May 2016 12:29:59 -0700] rev 29263
tests: don't save host fingerprints in hgrc Previously, the test saved the host fingerprints in hgrc. Many tests override the fingerprint at run-time. This was a bit dangerous and was too magical for my liking. It will also interfere with a future patch that adds a new source for obtaining fingerprints. So change the test to require the fingerprint on every command invocation.
Sat, 28 May 2016 11:58:28 -0700 sslutil: calculate host fingerprints from additional algorithms
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 May 2016 11:58:28 -0700] rev 29262
sslutil: calculate host fingerprints from additional algorithms Currently, we only support defining host fingerprints with SHA-1. A future patch will introduce support for defining fingerprints using other hashing algorithms. In preparation for that, we rewrite the fingerprint verification code to support multiple fingerprints, namely SHA-256 and SHA-512 fingerprints. We still only display the SHA-1 fingerprint. We'll have to revisit this code once we support defining fingerprints with other hash functions. As part of this, I snuck in a change to use range() instead of xrange() because xrange() isn't necessary for such small values.
Sat, 28 May 2016 12:57:28 -0700 util: add sha256
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 May 2016 12:57:28 -0700] rev 29261
util: add sha256 Upcoming patches will teach host fingerprint checking to verify non-SHA1 fingerprints. Many x509 certificates these days are SHA-256. And modern browsers often display the SHA-256 fingerprint for certificates. Since SHA-256 fingerprints are highly visible and easy to obtain, we want to support them for fingerprint pinning. So add SHA-256 support to util. I did not add SHA-256 to DIGESTS and DIGESTS_BY_STRENGTH because this will advertise the algorithm on the wire protocol. I wasn't sure if that would be appropriate. I'm playing it safe by leaving it out for now.
Sat, 28 May 2016 12:53:33 -0700 sslutil: move CA file processing into _hostsettings()
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 May 2016 12:53:33 -0700] rev 29260
sslutil: move CA file processing into _hostsettings() The CA file processing code has been moved from _determinecertoptions into _hostsettings(). As part of the move, the logic has been changed slightly and the "cacerts" variable has been renamed to "cafile" to match the argument used by SSLContext.load_verify_locations(). Since _determinecertoptions() no longer contains any meaningful code, it has been removed.
Sat, 28 May 2016 11:41:21 -0700 sslutil: move SSLContext.verify_mode value into _hostsettings
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 May 2016 11:41:21 -0700] rev 29259
sslutil: move SSLContext.verify_mode value into _hostsettings _determinecertoptions() and _hostsettings() are redundant with each other. _hostsettings() is used the flexible API we want. We start the process of removing _determinecertoptions() by moving some of the logic for the verify_mode value into _hostsettings(). As part of this, _determinecertoptions() now takes a settings dict as its argument. This is technically API incompatible. But since _determinecertoptions() came into existence a few days ago as part of this release, I'm not flagging it as such.
Sat, 28 May 2016 11:12:02 -0700 sslutil: introduce a function for determining host-specific settings
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 28 May 2016 11:12:02 -0700] rev 29258
sslutil: introduce a function for determining host-specific settings This patch marks the beginning of a series that introduces a new, more configurable, per-host security settings mechanism. Currently, we have global settings (like web.cacerts and the --insecure argument). We also have per-host settings via [hostfingerprints]. Global security settings are good for defaults, but they don't provide the amount of control often wanted. For example, an organization may want to require a particular CA is used for a particular hostname. [hostfingerprints] is nice. But it currently assumes SHA-1. Furthermore, there is no obvious place to put additional per-host settings. Subsequent patches will be introducing new mechanisms for defining security settings, some on a per-host basis. This commits starts the transition to that world by introducing the _hostsettings function. It takes a ui and hostname and returns a dict of security settings. Currently, it limits itself to returning host fingerprint info. We foreshadow the future support of non-SHA1 hashing algorithms for verifying the host fingerprint by making the "certfingerprints" key a list of tuples instead of a list of hashes. We add this dict to the hgstate property on the socket and use it during socket validation for checking fingerprints. There should be no change in behavior.
Fri, 27 May 2016 15:20:03 -0700 tests-subrepo-git: emit a different "pwned" message based on the test stable 3.8.3
Danek Duvall <danek.duvall@oracle.com> [Fri, 27 May 2016 15:20:03 -0700] rev 29257
tests-subrepo-git: emit a different "pwned" message based on the test Having a single "pwned" message which may or may not be emitted during the tests for CVE-2016-3068 leads to extra confusion. Allow each test to emit a more detailed message based on what the expectations are. In both cases, we expect a version of git which has had the vulnerability plugged, as well as a version of mercurial which also knows about GIT_ALLOW_PROTOCOL. For the first test, we make sure GIT_ALLOW_PROTOCOL is unset, meaning that the ext-protocol subrepo should be ignored; if it isn't, there's either a problem with mercurial or the installed copy of git. For the second test, we explicitly allow ext-protocol subrepos, which means that the subrepo will be accessed and a message emitted confirming that this was, in fact, our intention.
Fri, 27 May 2016 15:10:38 -0700 tests-subrepo-git: make the "pwned" message output in a stable order stable
Danek Duvall <danek.duvall@oracle.com> [Fri, 27 May 2016 15:10:38 -0700] rev 29256
tests-subrepo-git: make the "pwned" message output in a stable order The "pwned" message from this test gets gets sent to stderr, and so may get emitted in different places from run to run in the rest of mercurial's output. This patch forces the message to go to a specific file instead, whose existence and contents we can examine at a stable point in the test's execution.
Fri, 27 May 2016 11:14:29 -0700 test-cache-abuse: correct for different hunk headers between Solaris and GNU stable
Danek Duvall <danek.duvall@oracle.com> [Fri, 27 May 2016 11:14:29 -0700] rev 29255
test-cache-abuse: correct for different hunk headers between Solaris and GNU When diffing against an empty file, Solaris diff uses 1 to designate the first line of the empty file (either -1,0 on the left or +1,0 on the right) while GNU diff uses 0 (-0,0 and +0,0). We use a glob here to make sure the test passes with either toolchain. I've not added tests to check-code because there are scads of places in the tests where the GNU format is used due to that being the format that "hg diff" and "hg export" use, and changing those to use globs seems wrong.
Fri, 27 May 2016 21:24:05 +0200 lazymanifest: fix typo s/typles/tuples/ stable
Javi Merino <merino.jav@gmail.com> [Fri, 27 May 2016 21:24:05 +0200] rev 29254
lazymanifest: fix typo s/typles/tuples/
Wed, 25 May 2016 19:57:31 -0700 sslutil: remove sslkwargs() (API)
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 25 May 2016 19:57:31 -0700] rev 29253
sslutil: remove sslkwargs() (API) It is now unused.
Wed, 25 May 2016 19:57:02 -0700 url: remove use of sslkwargs
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 25 May 2016 19:57:02 -0700] rev 29252
url: remove use of sslkwargs
Wed, 25 May 2016 19:56:20 -0700 mail: remove use of sslkwargs
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 25 May 2016 19:56:20 -0700] rev 29251
mail: remove use of sslkwargs
Wed, 25 May 2016 19:54:06 -0700 httpconnection: remove use of sslkwargs
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 25 May 2016 19:54:06 -0700] rev 29250
httpconnection: remove use of sslkwargs It now does nothing.
Wed, 25 May 2016 19:52:02 -0700 sslutil: move sslkwargs logic into internal function (API)
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 25 May 2016 19:52:02 -0700] rev 29249
sslutil: move sslkwargs logic into internal function (API) As the previous commit documented, sslkwargs() doesn't add any value since its return is treated as a black box and proxied to wrapsocket(). We formalize its uselessness by moving its logic into a new, internal function and make sslkwargs() return an empty dict. The certificate arguments that sslkwargs specified have been removed from wrapsocket() because they should no longer be set.
Wed, 25 May 2016 19:43:22 -0700 sslutil: remove ui from sslkwargs (API)
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 25 May 2016 19:43:22 -0700] rev 29248
sslutil: remove ui from sslkwargs (API) Arguments to sslutil.wrapsocket() are partially determined by calling sslutil.sslkwargs(). This function receives a ui and a hostname and determines what settings, if any, need to be applied when the socket is wrapped. Both the ui and hostname are passed into wrapsocket(). The other arguments to wrapsocket() provided by sslkwargs() (ca_certs and cert_reqs) are not looked at or modified anywhere outside of sslutil.py. So, sslkwargs() doesn't need to exist as a separate public API called before wrapsocket(). This commit starts the process of removing external consumers of sslkwargs() by removing the "ui" key/argument from its return. All callers now pass the ui argument explicitly.
Wed, 25 May 2016 16:09:07 -0700 dirstate: remove file from copymap on drop
Mateusz Kwapich <mitrandir@fb.com> [Wed, 25 May 2016 16:09:07 -0700] rev 29247
dirstate: remove file from copymap on drop As the copymap is short-lived object regenerated from dirstate on each read this didn't affect us in any serious way. But since I've started working on permanent storage of copymap in my experiments with sqldirstate[1] I've seen this bug leaving the copy information in copymap after reverting the file moves and copies. [1] https://www.mercurial-scm.org/wiki/SQLDirstatePlan
Thu, 26 May 2016 02:35:44 +0000 run-tests: use json.dumps(separators=)
timeless <timeless@mozdev.org> [Thu, 26 May 2016 02:35:44 +0000] rev 29246
run-tests: use json.dumps(separators=) Followup to daff05dcd184 per Martijn Pieters
Thu, 26 May 2016 01:57:34 +0900 debugignore: make messages translatable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 26 May 2016 01:57:34 +0900] rev 29245
debugignore: make messages translatable These messages have been overlooked by check-code, because they start with non-alphabet character ('%' or '('). Making these messages translatable seems reasonable, because messages for ui.note(), ui.status(), ui.progress() and descriptive messages for ui.write() in "debug" commands are already translatable in many cases. This is also a part of preparation for making "missing _() in ui message" detection of check-code more exact.
Thu, 26 May 2016 01:57:34 +0900 grep: make a message translatable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 26 May 2016 01:57:34 +0900] rev 29244
grep: make a message translatable This message has been overlooked by check-code, because it starts with non-alphabet character (' '). This is also a part of preparation for making "missing _() in ui message" detection of check-code more exact.
Thu, 26 May 2016 01:57:34 +0900 subrepo: make a message translatable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 26 May 2016 01:57:34 +0900] rev 29243
subrepo: make a message translatable This message has been overlooked by check-code, because it starts with non-alphabet character ('%'). This is also a part of preparation for making "missing _() in ui message" detection of check-code more exact.
Thu, 26 May 2016 01:57:34 +0900 merge: make messages translatable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 26 May 2016 01:57:34 +0900] rev 29242
merge: make messages translatable These messages have been overlooked by check-code, because they start with non-alphabet character (' '). Making these messages translatable seems reasonable, because all other 'ui.note()'-ed messages in calculateupdates() are already translatable. This is also a part of preparation for making "missing _() in ui message" detection of check-code more exact.
Thu, 26 May 2016 01:57:34 +0900 httppeer: make a message translatable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 26 May 2016 01:57:34 +0900] rev 29241
httppeer: make a message translatable This message has been overlooked by check-code, because it starts with non-alphabet character ('('). Making this message translatable seems reasonable, because exception message below in same function is already translatable - 'cannot create new http repository' This is also a part of preparation for making "missing _() in ui message" detection of check-code more exact.
Thu, 26 May 2016 01:57:34 +0900 notify: make a message translatable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 26 May 2016 01:57:34 +0900] rev 29240
notify: make a message translatable This message has been overlooked by check-code, because it starts with non-alphabet character ('\'). Making this message translatable seems reasonable, because messages below in same function are already translatable - '\ndiffs (truncated from %d to %d lines):\n\n' - '\ndiffs (%d lines):\n\n' This is also a part of preparation for making "missing _() in ui message" detection of check-code more exact.
Thu, 26 May 2016 01:57:34 +0900 gpg: make a message translatable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Thu, 26 May 2016 01:57:34 +0900] rev 29239
gpg: make a message translatable This message has been overlooked by check-code, because it starts with non-alphabet character ('%'). This is also a part of preparation for making "missing _() in ui message" detection of check-code more exact.
Mon, 23 May 2016 14:09:50 -0700 revset: use getargsdict for sort()
Martijn Pieters <mjpieters@fb.com> [Mon, 23 May 2016 14:09:50 -0700] rev 29238
revset: use getargsdict for sort() This makes it possible to use keyword arguments to specify per-sort options. For example, a hypothetical 'first' option for the user sort could sort certain users first with: sort(all(), user, user.first=mpm@selenic.com)
Wed, 25 May 2016 15:32:35 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Wed, 25 May 2016 15:32:35 -0500] rev 29237
merge with stable
Thu, 12 May 2016 22:29:05 -0400 changegroup: extract method that sorts nodes to send
Augie Fackler <augie@google.com> [Thu, 12 May 2016 22:29:05 -0400] rev 29236
changegroup: extract method that sorts nodes to send The current implementation of narrowhg needs to influence the order in which nodes are sent to the client. adgar@ and I think this is fixable, but it's going to require pretty substantial time investment, so in the interim we'd like to extract this method. I think it makes the group() code a little more obvious, as it took us a couple of tries to isolate the exact behavior we were observing.
Wed, 11 May 2016 23:24:41 +0000 hg: disable demandimport for py3
timeless <timeless@mozdev.org> [Wed, 11 May 2016 23:24:41 +0000] rev 29235
hg: disable demandimport for py3
(0) -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip