revset: fix heads() order to always follow the input set (BC)
An argument expression should never affect the order of the result set.
That's the rule of the revset predicates.
stringutil: update list of re-special characters to include &~
I missed this because I was looking at the change that refactored
re.escape, and these characters were added in
https://github.com/python/cpython/commit/
05cb728d68a278d11466f9a6c8258d914135c96c.
Differential Revision: https://phab.mercurial-scm.org/D3850
tests: fix up some lax escaping in test-template-basic.t
These misfired escapes turn into hard errors in Python 3.7, and I'd
really rather we not work around it. We should *probably* try and find
a way to proactively warn users about invalid escape sequences.
There's one more failure of this type in this file on Python 3.7, but
I can't figure out the issue. It'll need to be corrected in a
follow-up.
Differential Revision: https://phab.mercurial-scm.org/D3843
cleanup: migrate from re.escape to stringutil.reescape
This has consistent behavior on Python 2.7, 3.6, and 3.7 and has the
benefit of probably being a little faster. Test output changes are
largely because / used to be pointlessly escaped.
Differential Revision: https://phab.mercurial-scm.org/D3842
stringutil: add a new function to do minimal regex escaping
Per https://bugs.python.org/
issue29995, re.escape() used to
over-escape regular expression strings, but in Python 3.7 that's been
fixed, which also improved the performance of re.escape(). Since it's
both an output change for us *and* a perfomance win, let's just
effectively backport the new behavior to hg on all Python versions.
Differential Revision: https://phab.mercurial-scm.org/D3841
graft: add no-commit mode (
issue5631)
This patch adds a new flag --no-commit in graft command. This feature
grafts the changes but do not create commits for those changes, grafted
changes will be added in the working directory. Also added tests to reflect
the expected behavior.
Differential Revision: https://phab.mercurial-scm.org/D2409
patchbomb: use email.mime.base instead of email.MIMEBase
The later was removed on Python 3.
On python 2:
>>> email.MIMEBase.MIMEBase is email.mime.base.MIMEBase
True
Differential Revision: https://phab.mercurial-scm.org/D3836
patchbomb: use email.mime.multipart instead of email.MIMEMultipart
The later was removed in Python 3.
On python 2:
>>> email.MIMEMultipart.MIMEMultipart is email.mime.multipart.MIMEMultipart
True
Differential Revision: https://phab.mercurial-scm.org/D3835
py3: add b'' prefixes in tests/test-bundle2-pushback.t
This makes the test run on Python 3.
# skip-blame because just b'' prefixes.
Differential Revision: https://phab.mercurial-scm.org/D3834