Boris Feld <boris.feld@octobus.net> [Tue, 14 Aug 2018 13:36:41 -0700] rev 39079
revlog: drop compatibility for `revlog.descendant` (API)
As advertised, the method is dropped in 4.8.
Boris Feld <boris.feld@octobus.net> [Tue, 14 Aug 2018 13:36:11 -0700] rev 39078
context: drop compatibility for `context.descendant` (API)
As advertised, the method is dropped in 4.8.
Yuya Nishihara <yuya@tcha.org> [Fri, 10 Aug 2018 09:20:44 +0900] rev 39077
cmdutil: remove _updatecleanmsg() which is no longer used anywhere
Yuya Nishihara <yuya@tcha.org> [Fri, 10 Aug 2018 09:18:37 +0900] rev 39076
cmdutil: fix weird indent in _mergemsg()
Matt Harbison <matt_harbison@yahoo.com> [Fri, 10 Aug 2018 00:28:07 -0400] rev 39075
cext: fix a warning about differing const qualifiers on Windows
The prototype takes a 'void *', but self->offsets is a 'const char **'.
mercurial/cext/revlog.c(2011) : warning C4090: 'function' : different
'const' qualifiers
Matt Harbison <matt_harbison@yahoo.com> [Fri, 10 Aug 2018 00:14:47 -0400] rev 39074
cext: fix most truncation warnings in revlog on Windows
There's one more, and I'm not sure why it isn't being tripped on other
platforms:
mercurial/cext/revlog.c(430) : warning C4244: '=' : conversion from
'Py_ssize_t' to 'char', possible loss of data
Matt Harbison <matt_harbison@yahoo.com> [Thu, 09 Aug 2018 23:52:45 -0400] rev 39073
cext: fix Windows warning about implicit conversion of 32-bit shift to 64 bit
mercurial/cext/revlog.c(1541) : warning C4334: '<<' : result of 32-bit shift
implicitly converted to 64 bits (was 64-bit shift int ended?)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 09 Aug 2018 00:09:03 -0700] rev 39072
index: make capacity argument to nt_init be measured in revisions
The nodetree's internal capacity field is measures in nodetree nodes,
which is not something the caller should have to know about.
Differential Revision: https://phab.mercurial-scm.org/D4166
Martin von Zweigbergk <martinvonz@google.com> [Wed, 08 Aug 2018 23:41:50 -0700] rev 39071
index: avoid duplicating capacity-growth expression
We were duplicating the "*2" instead of reusing it. It's overflow-safe
to reuse as long as the growth factor (i.e. currently 2) is not larger
than sizeof(nodetreenode) (currently 64 or 128).
Differential Revision: https://phab.mercurial-scm.org/D4165
Martin von Zweigbergk <martinvonz@google.com> [Wed, 08 Aug 2018 23:36:15 -0700] rev 39070
index: move check for too large capacity into nt_init()
It's clearer to have the check just before the allocation happens.
Differential Revision: https://phab.mercurial-scm.org/D4164
Martin von Zweigbergk <martinvonz@google.com> [Wed, 08 Aug 2018 22:26:57 -0700] rev 39069
shortest: don't include nullid in disambigution revset
As noted by Yuya in the review of D4118, the fact that the nodetree
always contains the nullid is not what we want for the disambiguation
case. It's not what the pure version of the code does.
Note that the updated test also passes before this patch, but it
wouldn't have passed in native-code mode once we start using the
nodetree for disambiguating nodeid prefixes.
Differential Revision: https://phab.mercurial-scm.org/D4163
Martin von Zweigbergk <martinvonz@google.com> [Wed, 08 Aug 2018 21:52:39 -0700] rev 39068
index: don't include nullid in the internal "length" field
This is a follow-up to
781b2720d2ac (index: don't include nullid in
len(), 2018-07-20). I intentionally didn't update the "index stats",
so it will also not include the space for nullid after this patch.
Differential Revision: https://phab.mercurial-scm.org/D4162
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 13:20:42 -0400] rev 39067
tests: add test coverage for revlogindex[-1] which was previously missing
Differential Revision: https://phab.mercurial-scm.org/D4184
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 01 Aug 2018 16:28:10 +0300] rev 39066
context: safegaurd from 'lx' being passed as file flag in manifest
Follows up for
d558e53cd6b619d5f671a7580513bfc66a398eac.
Differential Revision: https://phab.mercurial-scm.org/D4259
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 03:33:38 -0400] rev 39065
debugcommands: urlerror only has a read() method in Python 2
Differential Revision: https://phab.mercurial-scm.org/D4258
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 03:31:23 -0400] rev 39064
debugcommands: get_method should always return a sysstr
Differential Revision: https://phab.mercurial-scm.org/D4257
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 03:16:02 -0400] rev 39063
stringutil: if we get a memoryview in escapestr, coerce it to bytes
Otherwise we get an exception. Sadly, this manifesting deep inside the
wireproto code, inside a future. For some reason the exception was
/causing a hang/ rather than actually propagating out, which seems
like it might merit some investigation in the future.
Differential Revision: https://phab.mercurial-scm.org/D4256
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 03:14:52 -0400] rev 39062
debugcommands: fix a missing b prefix
This wasn't causing any immediate problems because of the source
transformer, but I noticed the inconsistency and it bugged me.
# skip-blame just a b prefix
Differential Revision: https://phab.mercurial-scm.org/D4255
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 02:31:44 -0400] rev 39061
wireprotohelpers: add missing b prefixes
# skip-blame just b prefixes
Differential Revision: https://phab.mercurial-scm.org/D4254
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 02:30:14 -0400] rev 39060
util: fix signature of setsockopt in socket observer
The format string expected the result, callers all passed the result,
but we didn't actually accept the result to this function. I swear
I've looked at this code a dozen times trying to find the problem, and
it was this simple all along.
Differential Revision: https://phab.mercurial-scm.org/D4253
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 02:03:26 -0400] rev 39059
tests: port test-glog.t to Python 3 by using extracted printrevset
Differential Revision: https://phab.mercurial-scm.org/D4252
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 02:02:40 -0400] rev 39058
tests: extract printrevset extension from test-glog-beautifygraph.t
Differential Revision: https://phab.mercurial-scm.org/D4251
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 02:18:41 -0400] rev 39057
tests: add missing b'' prefix in test-check-code.t
It now passes on Python 3.
# skip-blame b prefix
Differential Revision: https://phab.mercurial-scm.org/D4250
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 02:17:50 -0400] rev 39056
contrib: have check-code look at files in latin1 instead of ascii
This way all files open. So far none of our patterns look like they'll care.
Differential Revision: https://phab.mercurial-scm.org/D4249
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 00:37:24 -0400] rev 39055
tests: port inline extension in test for beautifygraph to Python 3
test-glog-beautifygraph.t now passes on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D4247
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 00:08:06 -0400] rev 39054
beautifygraph: use slicing instead of subscripting on bytestr
Differential Revision: https://phab.mercurial-scm.org/D4246
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 00:07:45 -0400] rev 39053
beautifygraph: use sysstr for checking encoding._wide
# skip-blame just an r prefix
Differential Revision: https://phab.mercurial-scm.org/D4245
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 01:42:01 -0400] rev 39052
stringutil: have buildrepr delegate to pprint for unknown types
This stabilizes some revset reprs across Python 2 and 3.
Differential Revision: https://phab.mercurial-scm.org/D4244
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 01:41:31 -0400] rev 39051
stringutil: teach pprint about sets
This is the old (Python 2) way of printing sets. I actually prefer the
Python 3 version of the repr, but this will result in less test churn
in the short term.
Differential Revision: https://phab.mercurial-scm.org/D4243
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 00:12:55 -0400] rev 39050
parser: replace bespoke _brepr with stringutil.pprint
Differential Revision: https://phab.mercurial-scm.org/D4242
Augie Fackler <augie@google.com> [Fri, 10 Aug 2018 02:06:46 -0400] rev 39049
mq: use stringutil.pprint instead of pycompat.byterepr
Resolves a few output changes on Python 3 in test-mq.t, and gets us
two new passing tests.
Differential Revision: https://phab.mercurial-scm.org/D4248
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 13:27:05 -0400] rev 39048
tests: remove expected output of test-parseindex2.py
Everything uses unittest idioms now, so this can go away.
Differential Revision: https://phab.mercurial-scm.org/D4185
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 13:13:16 -0400] rev 39047
parsers: adjust pure-python version to mimic
a3dacabd476b
This was caught by the tests, to my surprise. I'll also follow up with
a test of the index[-1] behavior so we can be sure that remains
consistent, as I think that currently has no coverage.
Differential Revision: https://phab.mercurial-scm.org/D4183
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 13:34:33 -0400] rev 39046
tests: restore Python 3 compat in test-parseindex2.py
I think this was previously getting lucky in Python 3, and would have
stacktraced if something failed. Now that failure messages are eagerly
computed, this turned into a problem.
Differential Revision: https://phab.mercurial-scm.org/D4182
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 13:26:28 -0400] rev 39045
tests: port remaining bits of test-parseindex2 to unittest asserts
Differential Revision: https://phab.mercurial-scm.org/D4181
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 23:13:56 -0400] rev 39044
tests: allow more detailed error message from re.compile
test-grep.t now passes on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D4240
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 23:13:35 -0400] rev 39043
grep: include format string in columns list
This lets us correctly use %d as needed.
Differential Revision: https://phab.mercurial-scm.org/D4239
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 23:13:01 -0400] rev 39042
grep: coerce username to bytestr, not str
Differential Revision: https://phab.mercurial-scm.org/D4238
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 23:12:44 -0400] rev 39041
grep: difflib sequencematcher opcodes are native strs
Differential Revision: https://phab.mercurial-scm.org/D4237
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 21:59:32 -0400] rev 39040
tests: allow for a bonus newline in base64'd email payload
Python 3 adds this newline, which is harmless.
test-patchbomb.t now passes on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D4234
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 21:58:43 -0400] rev 39039
mail: be more cautious about bytes vs str for py3 compat
It's suboptimal that we get a bytes on 2 and a unicode on 3, but it's
easy to work with and I'm disinclined to change anything unless we
start using some sort of type inferencer.
Differential Revision: https://phab.mercurial-scm.org/D4233
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 21:57:46 -0400] rev 39038
patchbomb: use native strings when determining attachment disposition
Differential Revision: https://phab.mercurial-scm.org/D4232
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 21:04:15 -0400] rev 39037
mail: always fall back to iso-8859-1 if us-ascii won't work (BC)
It looks like this was a well-intentioned backwards compat hack for
previewing the output of `hg email` in a stable way. Unfortunately I
think this hack's time has come, because Python 3 does a much better
job of ensuring it actually emits *valid* email messages. In
particular, Python 2 would blindly trust us that the bytes we handed
it were valid for the encoding we claimed, but Python 3 has some more
sniff-tests that we end up failing.
As a result, if we're going to print an email to the terminal, try
us-ascii first, but if that fails go straight to iso-8859-1 which
should be reasonably readable for ascii-compatible patch bodies. This
*will* be a breaking change for ascii-incompatible textual patch
content, but I don't think that's avoidable if we want to continue
using the email library from the stdlib.
.. bc::
Emails from the patchbomb extension will always be printed as though
they are iso-8859-1 if they're not valid us-ascii. Previously,
previewed emails were always claimed to be us-ascii and might
contain invalid byte sequences.
Differential Revision: https://phab.mercurial-scm.org/D4231
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 20:57:27 -0400] rev 39036
tests: put some Python 3 polish on inline Python invocations
A couple of these became inline python sessions because they got more
involved, and one of them is super-annoying and writes directly to
sys.stdout.buffer because I just couldn't make it work any other way.
Differential Revision: https://phab.mercurial-scm.org/D4230
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 19:39:33 -0400] rev 39035
patchbomb: don't unintentionally duplicate headers
This dict-like of headers is only mostly dict-like: if you set a key
that already exists, you it appends another value, rather than
replacing the one that was already present.
This fixes test-patchbomb-bookmark.t on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D4229
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 19:37:57 -0400] rev 39034
patchbomb: use sysstrs when describing content-type
Differential Revision: https://phab.mercurial-scm.org/D4228
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 18:28:43 -0400] rev 39033
patchbomb: use native strs for email header keys and values
Differential Revision: https://phab.mercurial-scm.org/D4223
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 18:28:19 -0400] rev 39032
patchbomb: use email.encoders instead of email.Encoders
No idea when this became a thing, but it exists for me in both 2.7 and 3.6.
Differential Revision: https://phab.mercurial-scm.org/D4222
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 18:27:36 -0400] rev 39031
mail: properly handle email addresses typically being unicodes
Visible progress in test-patchbomb.t on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D4221
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 20:08:30 -0700] rev 39030
tests: fix Python3 issues in Python one-liners in test-patchbomb.t
# skip-blame just byte prefixes
Differential Revision: https://phab.mercurial-scm.org/D4220
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 17:46:07 -0400] rev 39029
dummysmtpd: accept additional kwargs from stdlib smtpd
This was causing extremely mysterious failures because smtpd is
implemented using asynchat, which in turn doesn't appear to do
anything *remotely* helpful if an exception occurs.
# no-check-commit because I'm editing a foo_bar function signature
test-patchbomb-tls.t now passes in Python 3, but only because it
doesn't check message bodies like test-patchbomb.t. test-patchbomb.t
is *full* of doubled headers in the output (eg [0]) which seems like
an odd failure mode.
0:
@@ -141,12 +154,17 @@
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
+ MIME-Version: 1.0
+ Content-Type: text/plain; charset="us-ascii"
+ Content-Transfer-Encoding: 7bit
Subject: [PATCH] bookmark
X-Mercurial-Node:
8dab2639fd35f1e337ad866c372a5c44f1064e3c
X-Mercurial-Series-Index: 1
X-Mercurial-Series-Total: 1
Differential Revision: https://phab.mercurial-scm.org/D4219
Augie Fackler <augie@google.com> [Thu, 09 Aug 2018 17:44:36 -0400] rev 39028
mail: fix debug print, which appears to have been broken for a long time
I noticed this when trying to debug very mysterious dummysmtpd
problems. It turns out you can set self.debuglevel to a number greater
than 0 and have smtplib print helpful debug output, but this output on
our side of things was broken.
Differential Revision: https://phab.mercurial-scm.org/D4218
Augie Fackler <augie@google.com> [Mon, 16 Jul 2018 18:17:44 -0400] rev 39027
patchbomb: python 3 really wants those email addresses in unicode
At this point, test-patchbomb-tls.t almost passes on Python 3, but I'm
not really sure what the issue is: we just get a `abort: Connection
unexpectedly closed` that doesn't make sense to me.
Differential Revision: https://phab.mercurial-scm.org/D3957
Augie Fackler <augie@google.com> [Mon, 16 Jul 2018 18:17:19 -0400] rev 39026
mail: stop using the smtplib.SSLFakeFile and use socket.socket.makefile
They're equivalent, and the latter is what Python 3.3 says to use in
the release notes. Turns out it works on Python 2 as well.
Differential Revision: https://phab.mercurial-scm.org/D3956
Augie Fackler <augie@google.com> [Mon, 16 Jul 2018 18:16:26 -0400] rev 39025
mail: modernize check for Python-with-TLS
We used to be going indirectly through the socket module, but now we
just check for the ssl module.
Differential Revision: https://phab.mercurial-scm.org/D3955
Augie Fackler <augie@google.com> [Mon, 16 Jul 2018 17:49:17 -0400] rev 39024
mail: cope with Py3 unicode antics on email addresses
Differential Revision: https://phab.mercurial-scm.org/D3954
Augie Fackler <augie@google.com> [Mon, 16 Jul 2018 17:48:03 -0400] rev 39023
mail: fix _encode to be more correct on Python 3
This code appears to be on the wrong side of the law in Python 2, at
least some of the time. In Python 3, it's definitely wrong in places,
but fortunately that's easy to fix.
Differential Revision: https://phab.mercurial-scm.org/D3953
Augie Fackler <augie@google.com> [Mon, 16 Jul 2018 14:14:27 -0400] rev 39022
patchbomb: work around email module really wanting to write unicode data
Differential Revision: https://phab.mercurial-scm.org/D3951
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Aug 2018 14:00:35 -0400] rev 39021
convert: don't drop missing or corrupt tag entries
Cleaning up the tags file could be a useful feature in some cases, so maybe
there should be a switch for this. However, the default hg -> hg convert tries
to maintain identical hashes (thus convert.hg.saverev is off by default, but is
on by default for other source types). It looks like _rewritesubstate() has a
`continue` in it, and therefore a similar problem.
I ran into this conversion divergence when a coworker "merged" two repositories
by copy/pasting all of the files from the source repo and massaging the code,
and forgetting to revert the .hg* files. That silently emptied the .hgtags file
after the conversion. (This isn't the manifest node bug Yuya has been helping
with- this occurred well after the bzr -> hg conversion and wasn't a merge
commit, which made it extra puzzling. That bug is still an issue.)
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Aug 2018 12:25:06 -0700] rev 39020
changegroup: invert conditional and dedent
I don't like else-less blocks that are indented for no reason.
Differential Revision: https://phab.mercurial-scm.org/D4217