Manuel Jacob <me@manueljacob.de> [Sat, 30 May 2020 05:27:53 +0200] rev 44940
tests: remove "sslcontext" check
Now that we require the presence of ssl.SSLContext in setup.py, the check
would always return `True`.
Manuel Jacob <me@manueljacob.de> [Sat, 30 May 2020 03:23:58 +0200] rev 44939
sslutil: eliminate `_canloaddefaultcerts` by constant-folding code using it
Manuel Jacob <me@manueljacob.de> [Sat, 30 May 2020 05:08:02 +0200] rev 44938
tests: remove "defaultcacerts" check
`sslutil._canloaddefaultcerts` is always true (and will be removed).
Manuel Jacob <me@manueljacob.de> [Fri, 29 May 2020 21:30:04 +0200] rev 44937
sslutil: eliminate `modernssl` by constant-folding code using it
Manuel Jacob <me@manueljacob.de> [Sat, 30 May 2020 04:59:13 +0200] rev 44936
hgweb: avoid using `sslutil.modernssl`
`sslutil.modernssl` is going to be removed. Since the point of using this
attribute was to check the importability of the `sslutil`, a different
attribute can be used. `sslutil.wrapserversocket` is used because it’s anyway
used a few lines below.
Manuel Jacob <me@manueljacob.de> [Fri, 29 May 2020 22:31:26 +0200] rev 44935
sslutil: remove comments referring to removed SSLContext emulation class
Manuel Jacob <me@manueljacob.de> [Fri, 29 May 2020 21:18:22 +0200] rev 44934
sslutil: remove code checking for presence of ssl.SSLContext
Now that we require the presence of ssl.SSLContext in setup.py, we can remove
this code.
Manuel Jacob <me@manueljacob.de> [Fri, 29 May 2020 21:07:26 +0200] rev 44933
setup: require a Python version with modern SSL features
This increases the minimum security baseline of Mercurial and enables us to
remove compatibility code for supporting older, less secure Python versions.
Manuel Jacob <me@manueljacob.de> [Sat, 30 May 2020 03:46:59 +0200] rev 44932
sslutil: set `_canloaddefaultcerts` to `True` if `ssl.SSLContext` is present
The `load_default_certs()` method was already present when `ssl.SSLContext`
was backported to Python 2.7 (https://hg.python.org/cpython/rev/221a1f9155e2).
Augie Fackler <augie@google.com> [Thu, 28 May 2020 16:16:13 -0400] rev 44931
filemerge: add __bytes__ for absentfilectx
This will at _least_ aid some upcoming debugging.
Differential Revision: https://phab.mercurial-scm.org/D8592
Augie Fackler <augie@google.com> [Thu, 28 May 2020 16:17:28 -0400] rev 44930
mergestate: move staticmethod _filectxorabsent to module level
I suspect this was a static method just because it made merge.py feel
less messy, but now we have a mergestate package so we can do better.
Differential Revision: https://phab.mercurial-scm.org/D8591
Raphaël Gomès <rgomes@octobus.net> [Fri, 29 May 2020 12:17:59 +0200] rev 44929
rust: remove support for `re2`
With the performance issues with `regex` figured out and fixed in previous
patches and `regex` newly gaining support for empty alternations, there is no
reason to keep `re2` around anymore. It's only *marginally* faster at creating
the regex which saves at most a couple of ms, but gets beaten by `regex` in
every other aspect.
This removes the Rust/C/C++ bridge (hooray!), the `with-re2` feature, the
conditional code that goes with it, the documentation and relevant part of the
debug/module output.
Differential Revision: https://phab.mercurial-scm.org/D8594
Raphaël Gomès <rgomes@octobus.net> [Fri, 29 May 2020 12:12:16 +0200] rev 44928
rust-dependencies: update `regex` to 1.3.9
Version `1.3.8` introduces support for empty alternations, which makes
previously disallowed patterns usable in `regex`.
From a user's perspective, this means that glob patterns like `*.py{,c}` will
no longer generate an "invalid" regex and will use the Rust path.
`1.3.9` is a bugfix release, might as well update to the latest one.
Differential Revision: https://phab.mercurial-scm.org/D8593
Manuel Jacob <me@manueljacob.de> [Fri, 29 May 2020 04:06:16 +0200] rev 44927
cleanup: remove compatibility code for Python < 2.7.4
The minimum supported Python version was recently raised to 2.7.4.
Manuel Jacob <me@manueljacob.de> [Fri, 29 May 2020 03:56:07 +0200] rev 44926
cleanup: eliminate procutil.quotecommand()
After some compatibility code was removed, the function was the identity
function on all platforms.
Manuel Jacob <me@manueljacob.de> [Fri, 29 May 2020 03:43:08 +0200] rev 44925
cleanup: remove compatibility code for Python < 2.7.1
The minimum supported Python version was recently raised to 2.7.4.
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Mon, 25 May 2020 17:39:23 -0400] rev 44924
grep: reduce the cost of pathauditor checks when grepping working copy
Running `time hg grep zxczxczxczxczxc -l` on mozilla-central:
before:
real 0m20,000s
user 0m15,796s
sys 0m4,189s
after:
real 0m10,903s
user 0m8,964s
sys 0m1,916s
if vfs didn't call pathauditor at all:
real 0m7,781s
user 0m5,968s
sys 0m1,790s
Differential Revision: https://phab.mercurial-scm.org/D8582
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Mon, 25 May 2020 17:32:25 -0400] rev 44923
grep: test that paths get audited
Differential Revision: https://phab.mercurial-scm.org/D8581
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Mon, 25 May 2020 17:29:38 -0400] rev 44922
grep: add test coverage of behavior on symlinks
Differential Revision: https://phab.mercurial-scm.org/D8580
Aay Jay Chan <aayjaychan@itopia.com.hk> [Fri, 22 May 2020 22:20:37 +0800] rev 44921
help: fix description of revlog version 2
Differential Revision: https://phab.mercurial-scm.org/D8576
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Tue, 26 May 2020 08:15:09 -0400] rev 44920
files: speed up `hg files` when no flags change display
It's not the first time I see slowness from this command slow down
tools built on top of hg.
The majority of the time is spent merely printing the result before
this change, which is clearly not how it should be (especially since
the computation of the result also looks slow).
Running `hg files` in mozilla-central:
parent revision: 1,260s
this commit: 0,683s
this commit without batching ui.write: 0,931s
this commit replacing the body of the loop with `pass`: 0,566s
This looks like a prime candidate for a rust fast path, but until
then, it seems reasonable to optimize the python.
Differential Revision: https://phab.mercurial-scm.org/D8586
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Mon, 25 May 2020 22:47:12 -0400] rev 44919
sshpeer: make client print (likely) server errors on stderr (BC)
so `hg clone -q` or `hg pull -q` don't print `abort: no suitable
response from remote hg!` with no indication of what went wrong.
There are other errors still silenced by -q (like failing to push due
to a server hook), but the current change covers a good fraction of
the problem (all errors setting up the ssh connection, no such remote
repository, no access to the repository).
Differential Revision: https://phab.mercurial-scm.org/D8584
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Mon, 25 May 2020 20:02:15 -0400] rev 44918
sshpeer: add test showing that -q silences remote errors
Differential Revision: https://phab.mercurial-scm.org/D8583
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Tue, 26 May 2020 07:03:11 -0400] rev 44917
scmutil: speed up relativization of paths when it's a no-op
Running commands from the root is commmon, in particular for
automation. Running `hg files > /tmp/a` from the root of
mozilla-central on linux:
before:
real 0m1,510s
user 0m1,387s
sys 0m0,090s
after:
real 0m1,266s
user 0m1,165s
sys 0m0,073s
(there are 280k paths, so this was costing ~1us per path somehow)
Differential Revision: https://phab.mercurial-scm.org/D8585
Augie Fackler <augie@google.com> [Mon, 18 May 2020 16:00:26 -0400] rev 44916
context: implement mergestate() method
This will let us have the mergestate storage be controlled by the context. In
particular, for working contexts we should use the existing mergestate, but
for overlay contexts it's inappropriate to drop files in .hg/merge.
Differential Revision: https://phab.mercurial-scm.org/D8551
Augie Fackler <augie@google.com> [Mon, 18 May 2020 14:59:59 -0400] rev 44915
mergestate: split out merge state handling code from main merge module
There's already some pretty reasonable encapsulation here, but I want
to make the mergestate storage a property of the context so memctx
instances can do a reasonable thing. This is the first step in a
reshuffle to make that easier.
Differential Revision: https://phab.mercurial-scm.org/D8550
Augie Fackler <augie@google.com> [Mon, 18 May 2020 12:45:45 -0400] rev 44914
tests: add coverage for repo.changelog.children() in the git extension
Differential Revision: https://phab.mercurial-scm.org/D8548
Augie Fackler <augie@google.com> [Mon, 18 May 2020 12:41:16 -0400] rev 44913
tests: add coverage for repo.changelog.findmissing() in test-git-interop.t
This at least does a basic test of the method. It's not
super-complete, but it's better than the nothing we'd otherwise have.
Differential Revision: https://phab.mercurial-scm.org/D8547
Augie Fackler <augie@google.com> [Mon, 18 May 2020 13:18:05 -0400] rev 44912
relnotes: add API change note per request in D8502
Differential Revision: https://phab.mercurial-scm.org/D8549
Martin von Zweigbergk <martinvonz@google.com> [Tue, 26 May 2020 08:07:24 -0700] rev 44911
merge with stable
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sun, 17 May 2020 18:33:45 -0400] rev 44910
grep: grep the working copy faster
`hg grep qqqq` in the mercurial repo:
before: 0,859s
after: 0,233s
`hg grep somethingwithnomatch` in mozilla-central:
before: 51s
after: 19s
This is probably also a tiny bug fix, because the code was looking up
a node for filename `pfn` on a filelog for filename `fn`, which are
most of the time the same filename, but don't have to be.
Ignoring performance and the bug fix, the code should have the same
behavior.
Differential Revision: https://phab.mercurial-scm.org/D8545
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sun, 17 May 2020 13:10:54 -0400] rev 44909
grep: stop computing information for --diff when unnecessary
This is one reason why `hg grep pattern` essentially does `hg cat -r
. 'set:**'` inside. There is no speed improvement in this commit,
because the rest of the code still greps data from filelog instead of
working copy when possible.
Differential Revision: https://phab.mercurial-scm.org/D8544
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sun, 17 May 2020 12:52:43 -0400] rev 44908
grep: don't go in an infinite loop when given empty regex
Differential Revision: https://phab.mercurial-scm.org/D8543
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sun, 17 May 2020 12:49:12 -0400] rev 44907
grep: improve test coverage
Differential Revision: https://phab.mercurial-scm.org/D8542
Steve Fink <sfink@mozilla.com> [Thu, 27 Feb 2020 09:54:34 -0800] rev 44906
phabricator: avoid passing None to pycompat.fsdecode
Differential Revision: https://phab.mercurial-scm.org/D8525
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sun, 17 May 2020 12:23:03 -0400] rev 44905
setup: stop asking cargo to spam
It prints this kind of stuff by default:
Compiling regex v1.3.6
Compiling rand v0.7.3
Compiling crossbeam-deque v0.7.3
which is way better than we ask for before this change, which is
screen after screen of compilation commands and irrelevant warnings in
crates we use.
Differential Revision: https://phab.mercurial-scm.org/D8537
Romain DEP. <rom1dep@gmail.com> [Mon, 11 May 2020 21:54:05 +0200] rev 44904
git: implement some changelog methods
Differential Revision: https://phab.mercurial-scm.org/D8540
Romain DEP. <rom1dep@gmail.com> [Mon, 11 May 2020 21:56:11 +0200] rev 44903
git: avoid looking-up parents for the null commit
Differential Revision: https://phab.mercurial-scm.org/D8541
Romain DEP. <rom1dep@gmail.com> [Mon, 11 May 2020 21:56:43 +0200] rev 44902
git: fix probable missing return
Differential Revision: https://phab.mercurial-scm.org/D8539
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sun, 17 May 2020 12:28:32 -0400] rev 44901
rust: fix warning about unnecessary mut
If there's a reason to use mut (like compability with older
compilers), then we should stick `#[allow(unused_mut)]` on the
declaration.
Differential Revision: https://phab.mercurial-scm.org/D8538
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Apr 2020 06:09:14 +0200] rev 44900
upgrade: support upgrade and downgrade from persistent nodemap
The requirements is now recognised and dealt with and the associated files
properly handled.
The persistent nodemap should be ready for usage in the field now.
Differential Revision: https://phab.mercurial-scm.org/D8431
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 May 2020 11:39:50 +0200] rev 44899
status: also support for `traversedir` callback in the Rust fast-path
Repeating the performance numbers from the `hg-core` change:
Running `hg clean/purge` on Netbeans' repo (100k files):
```
| No-op | 30% unknown
--------------------------
Rust | 1.0s | 1.67s
C | 2.0s | 2.87s
```
Differential Revision: https://phab.mercurial-scm.org/D8520
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 May 2020 11:37:55 +0200] rev 44898
rust-hg-cpython: update status bridge with the new `traversedir` support
Differential Revision: https://phab.mercurial-scm.org/D8519
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 May 2020 11:36:52 +0200] rev 44897
rust-status: collect traversed directories if required
Some commands (`hg purge` notably) register the `traversedir` callback on their
matcher to run said callback every time a directory is traversed.
This is the first of three patches, further broadening Rust support for status.
Unfortunately, there is no way around collecting a full `Vec` (or any other
owned datastructure, like a radix tree) and pushing it back up the Python layer
since keeping the Python callback in a closure would mean giving up
multithreading because of the GIL, which is obviously unacceptable.
Performance is still a lot better than the Python+C path.
Running `hg clean/purge` on Netbeans' repo (100k files):
```
| No-op | 30% unknown
--------------------------
Rust | 1.0s | 1.67s
C | 2.0s | 2.87s
```
Differential Revision: https://phab.mercurial-scm.org/D8518
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 May 2020 12:41:28 +0200] rev 44896
rust-status: don't dispatch unknown file when traversing if not listing unknowns
This usually isn't a (functional) problem since we ignore the unknown files
anyway, but when specifically using `hg purge`, unknown files were iterated over
regardless of the option being true.
This is both more correct and more efficient.
Differential Revision: https://phab.mercurial-scm.org/D8517
Raphaël Gomès <rgomes@octobus.net> [Tue, 12 May 2020 10:03:51 +0200] rev 44895
status: update comment to reflect the more recent situation
This is a gratuitous cleanup.
Differential Revision: https://phab.mercurial-scm.org/D8516
Joerg Sonnenberger <joerg@bec.de> [Fri, 01 May 2020 01:32:08 +0200] rev 44894
hooks: provide access to transaction changes for internal hooks
External hooks are skipped here as the environment often has a size
limit in the low MBs and that can easily be reached by larger
transactions.
Differential Revision: https://phab.mercurial-scm.org/D8490
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 May 2020 23:54:37 +0200] rev 44893
rust-regex: add test for verbatim regex syntax
This makes sure it's not modified.
Differential Revision: https://phab.mercurial-scm.org/D8508