Gregory Szorc <gregory.szorc@gmail.com> [Wed, 25 May 2016 19:57:02 -0700] rev 29252
url: 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
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.
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.
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.
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
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
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.
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.
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.
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.
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.
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.
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.
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)
Matt Mackall <mpm@selenic.com> [Wed, 25 May 2016 15:32:35 -0500] rev 29237
merge with stable
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.
timeless <timeless@mozdev.org> [Wed, 11 May 2016 23:24:41 +0000] rev 29235
hg: disable demandimport for py3
Yuya Nishihara <yuya@tcha.org> [Sun, 15 May 2016 10:48:05 +0900] rev 29234
tests: enable import checker for all python files (including no .py files)
i18n/posplit is excluded as it couldn't be trivially fixed. That's the same
as
99a2bdad0fda.
Yuya Nishihara <yuya@tcha.org> [Sun, 15 May 2016 10:45:32 +0900] rev 29233
tests: make 'f' utility import hashlib unconditionally
It must exist on Python 2.5+.
Yuya Nishihara <yuya@tcha.org> [Sun, 15 May 2016 10:41:01 +0900] rev 29232
tests: fix typo of shebang prefix in test-check-pyflakes.t
Yuya Nishihara <yuya@tcha.org> [Sun, 15 May 2016 10:40:26 +0900] rev 29231
hghave: silence future pyflakes warning of unused import
Yuya Nishihara <yuya@tcha.org> [Sun, 15 May 2016 10:39:44 +0900] rev 29230
tests: remove unused import from 'f' utility
It should have been caught by pyflakes.
liscju <piotr.listkiewicz@gmail.com> [Tue, 24 May 2016 23:36:27 +0200] rev 29229
bookmarks: allow pushing active bookmark on new remote head (
issue5236)
Before 'hg push -B .' on new remote head complained with:
abort: push creates new remote head ...
It was because _nowarnheads was not expanding active bookmark
name, so it didn't add active bookmark "proper" name to no
warn heads list.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 15 May 2016 11:50:49 -0700] rev 29228
sslutil: remove redundant check of sslsocket.cipher()
We are doing this check in both wrapsocket() and validatesocket().
The check was added to the validator in
4bb59919c905 and the commit
message justifies the redundancy with a "might." The check in
wrapsocket() was added in
0cc4ad757c77, which appears to be part of
the same series. I'm going to argue the redundancy isn't needed.
I choose to keep the check in wrapsocket() because it is working
around a bug in Python's wrap_socket() and I feel the check for
the bug should live next to the function call exhibiting the bug.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 15 May 2016 11:38:38 -0700] rev 29227
sslutil: convert socket validation from a class to a function (API)
Now that the socket validator doesn't have any instance state,
we can make it a generic function.
The "validator" class has been converted into the "validatesocket"
function and all consumers have been updated.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 15 May 2016 11:32:11 -0700] rev 29226
sslutil: store and use hostname and ui in socket instance
Currently, we pass a hostname and ui to sslutil.wrap_socket()
then create a separate sslutil.validator instance also from
a hostname and ui. There is a 1:1 mapping between a wrapped
socket and a validator instance. This commit lays the groundwork
for making the validation function generic by storing the
hostname and ui instance in the state dict attached to the
socket instance and then using these variables in the
validator function.
Since the arguments to sslutil.validator.__init__ are no longer
used, we make them optional and make __init__ a no-op.
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 15 May 2016 11:25:07 -0700] rev 29225
sslutil: use a dict for hanging hg state off the wrapped socket
I plan on introducing more state on the socket instance. Instead
of using multiple variables, let's just use one to minimize risk
of name collision.
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 05 May 2016 19:10:18 -0700] rev 29224
sslutil: require serverhostname argument (API)
All callers now specify it. So we can require it.
Requiring the argument means SNI will always work if supported
by Python.
The main reason for this change is to store state on the socket
instance to make the validation function generic. This will be
evident in subsequent commits.
Matt Mackall <mpm@selenic.com> [Wed, 18 May 2016 16:37:32 -0500] rev 29223
annotate: optimize line counting
We used len(text.splitlines()) to count lines. This allocates, copies, and
deallocates an object for every line in a file. Instead, we use
count("\n") to count newlines and adjust based on whether there's a
trailing newline.
This improves the speed of annotating localrepo.py from 4.2 to 4.0
seconds.
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 16 May 2016 14:21:39 -0700] rev 29222
purge: use opts.get()
Most commands use opts.get() to retrieve values for options
that may not be explicitly passed. purge wasn't.
This makes it easier to call purge() from 3rd party extensions.
timeless <timeless@mozdev.org> [Wed, 11 May 2016 15:20:25 +0000] rev 29221
test-run-tests: clean up inuse server eagerly