- Jan 16, 2020
-
-
Raphaël Gomès authored
This assumes that Re2 is installed following Google's guide. I am not sure how we want to integrate it in the project, but I think a follow-up patch would be more appropriate for such work. As it stands, *not* having Re2 installed results in a compilation error, which is a problem as it breaks install compatibility. Hence, this is gated behind a non-default `with-re2` compilation feature. Differential Revision: https://phab.mercurial-scm.org/D7910
-
Raphaël Gomès authored
This prepares a future patch for `IncludeMatcher` on the road to bare `hg status` support. Differential Revision: https://phab.mercurial-scm.org/D7909
-
Raphaël Gomès authored
Within the next few patches we will be using this new API. Differential Revision: https://phab.mercurial-scm.org/D7908
-
- Jan 14, 2020
-
-
Raphaël Gomès authored
Differential Revision: https://phab.mercurial-scm.org/D7871
-
- Jan 21, 2020
-
-
Matt Harbison authored
This will be neccessary for LFS, which manages the progressbar outside of the file. Differential Revision: https://phab.mercurial-scm.org/D7960
-
- Feb 10, 2020
-
-
Raphaël Gomès authored
This fix introduces the same encapsulation as the `copymap`. There is no easy way of doing this any better for now. `hg up -r null && time HGRCPATH= HGMODULEPOLICY=rust+c hg up tip` on Mozilla Central, (not super recent, but it doesn't matter): Before: 7:44,08 total After: 1:03,23 total Pretty brutal regression! Differential Revision: https://phab.mercurial-scm.org/D8049
-
- Feb 09, 2020
-
-
sliquister authored
Differential Revision: https://phab.mercurial-scm.org/D8101
-
sliquister authored
It seems reasonable to have a similar mechanism for the rest of the help, but no such thing is implemented. The goal is to make the help of commands clearer in the presence of significant default changes, like tweakdefaults or with company-wide hgrcs. In these cases, a user looking at the help of a command doesn't exactly know what his hgrc is doing. Apply to this to the --git option of commands that display diffs, as this option in particular causes confusion for some reason. Differential Revision: https://phab.mercurial-scm.org/D8100
-
Matt Harbison authored
The other fix for this was to leave the mode as bytes, and import `pycompat.open()` like a bunch of other modules do. But I think it's confusing to still use bytes at the python boundary, and obviously error prone. Grepping for ` open\(.+, ['"][a-z]+['"]\)` and ` open\(.+, b['"][a-z]+['"]\)` outside of `tests`, there are 51 and 87 uses respectively, so it's not like this is a rare direct usage. Differential Revision: https://phab.mercurial-scm.org/D8099
-
- Jan 30, 2020
-
-
Raphaël Gomès authored
Performance of `hg update` was significantly worse since the introduction of the Rust `dirstatemap`. This regression was noticed by Valentin Gatien-Baron when working on a large repository, as it goes unnoticed for smaller repositories like Mercurial itself. This fix introduces the same getter/setter mechanism at `hg-core` level as for `set/get_dirs`. While this technique is, as previously discussed, quite suboptimal, it fixes an important enough problem. Refactoring `hg-core` to use the typestate pattern could be a good approach to improving code quality in a future patch. Differential Revision: https://phab.mercurial-scm.org/D8048
-
- Feb 07, 2020
-
-
Valentin Gatien-Baron authored
This is done by discarding any partial cache entry, instead of filling the partial cache entry with 0xff before. Differential Revision: https://phab.mercurial-scm.org/D8095
-
Valentin Gatien-Baron authored
I'm seeing an error of this form in production on the order of once a month. I'm not sure how it happens, but I suspect interrupting a pull might result in half written cache entries. Differential Revision: https://phab.mercurial-scm.org/D8094
-
Valentin Gatien-Baron authored
Differential Revision: https://phab.mercurial-scm.org/D8093
-
- Feb 08, 2020
-
-
sliquister authored
It's convenient for deleting build artifacts. Using --all instead would delete other things too. Differential Revision: https://phab.mercurial-scm.org/D8096
-
- Jan 31, 2020
-
-
Matt Harbison authored
The C executable sets this too, otherwise no output shows up (when paging?). There is also `legacy_windows_fs_encoding`, but I'm not setting that for now because the C executable doesn't either. Differential Revision: https://phab.mercurial-scm.org/D8053
-
- Feb 05, 2020
-
-
Augie Fackler authored
As with other patches in this series, this avoids making a potentially-expensive copy of a manifest. Differential Revision: https://phab.mercurial-scm.org/D8084
-
Augie Fackler authored
This also skips using diff() when all we care about is the filenames. I'm expecting the built in set logic to be plenty fast. For really large manifests with a matcher in play this should copy substantially less data around. Differential Revision: https://phab.mercurial-scm.org/D8082
-
- Feb 07, 2020
-
-
Pulkit Goyal authored
-
- Feb 06, 2020
-
-
Augie Fackler authored
All we care about is the filepaths, so this avoids a pointless copy of the manifest that we only used to extract matching filenames. Differential Revision: https://phab.mercurial-scm.org/D8090
-
- Jan 24, 2020
-
-
Raphaël Gomès authored
While we wait on a future patch that could verify that the paths passed to `DirsMultiset` have been audited, we still need to handle this error. This patch makes it easier to bubble up and makes the error clearer. Also, this patch introduces the `subslice_index` function that could be useful for other - albeit niche - purposes. Differential Revision: https://phab.mercurial-scm.org/D7921
-
- Jan 22, 2020
-
-
Matt Harbison authored
Otherwise the clone command will emit a long stacktrace if there is no `=` character. Differential Revision: https://phab.mercurial-scm.org/D7969
-
- Dec 13, 2019
-
-
Pierre-Yves David authored
The copies test we currently have usually focus on simple case that do not dive too much into longer chains involving merges. This new test file focus on extensive testing of these case to validate their behavior and make sure the various copies algorithm have the same behavior. And… actually these test are currently broken for the changeset centric algorithm since 99ebde4fec99, but it went undetected because these case were not tested. Differential Revision: https://phab.mercurial-scm.org/D8078
-
- Sep 18, 2019
-
-
Jörg Sonnenberger authored
Differential Revision: https://phab.mercurial-scm.org/D7733
-
- Feb 07, 2020
-
-
Julien Cristau authored
hghave --test-features calls it 90 times, each one calling hg --version which takes a tenth of a second on my workstation, adding up to about 10s win on test-hghave.t. Fixes https://bugs.debian.org/939756 Differential Revision: https://phab.mercurial-scm.org/D8092
-
- Jan 24, 2020
-
-
Martin von Zweigbergk authored
The responsibility for clearing it is now in `cmdutil.clearunfinished()`, so we shouldn't have to unlink it in `hg.clean()`. Differential Revision: https://phab.mercurial-scm.org/D7992
-
- Feb 04, 2020
-
-
Martin von Zweigbergk authored
The call to `y.ancestor(x)` triggered repo filtering, which we'd like to avoid in the simple `hg status --copies` case. Differential Revision: https://phab.mercurial-scm.org/D8071
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D8070
-
- Jan 21, 2020
-
-
Matt Harbison authored
With the stall issue seemingly fixed, there's no reason not to use workers. The setting is left for now to keep the test output deterministic, and in case other issues come up. If none do, this can be converted to a developer setting for usage with the tests. Differential Revision: https://phab.mercurial-scm.org/D7963
-
Matt Harbison authored
We've avoided the issue up to this point by gating worker usage with an experimental config. See 10e62d5efa73, and the thread linked there for some of the initial diagnosis, but essentially some data was being read from the blob before an error occurred and `keepalive` retried, but didn't rewind the file pointer. So the leading data was lost from the blob on the server, and the connection stalled, trying to send more data than available. In trying to recreate this, I was unable to do so uploading from Windows to CentOS 7. But it reproduced every time going from CentOS 7 to another CentOS 7 over https. I found recent fixes in the FaceBook repo to address this[1][2]. The commit message for the first is: The KeepAlive HTTP implementation is bugged in it's retry logic, it supports reading from a file pointer, but doesn't support rewinding of the seek cursor when it performs a retry. So it can happen that an upload fails for whatever reason and will then 'hang' on the retry event. The sequence of events that get triggered are: - Upload file A, goes OK. Keep-Alive caches connection. - Upload file B, fails due to (for example) failing Keep-Alive, but LFS file pointer has been consumed for the upload and fd has been closed. - Retry for file B starts, sets the Content-Length properly to the expected file size, but since file pointer has been consumed no data will be uploaded, causing the server to wait for the uploaded data until either client or server reaches a timeout, making it seem as our mercurial process hangs. This is just a stop-gap measure to prevent this behavior from blocking Mercurial (LFS has retry logic). A proper solutions need to be build on top of this stop-gap measure: for upload from file pointers, we should support fseek() on the interface. Since we expect to consume the whole file always anyways, this should be safe. This way we can seek back to the beginning on a retry. I ported those two patches, and it works. But I see that `url._sendfile()` does a rewind on `httpsendfile` objects[3], so maybe it's better to keep this all in one place and avoid a second seek. We may still want the first FaceBook patch as extra protection for this problem in general. The other two uses of `httpsendfile` are in the wire protocol to upload bundles, and to upload largefiles. Neither of these appear to use a worker, and I'm not sure why workers seem to trigger this, or if this could have happened without a worker. Since `httpsendfile` already has a `close()` method, that is dropped. That class also explicitly says there's no `__len__` attribute, so that is removed too. The override for `read()` is necessary to avoid the progressbar usage per file. [1] https://github.com/facebookexperimental/eden/commit/c350d6536d90c044c837abdd3675185644481469 [2] https://github.com/facebookexperimental/eden/commit/77f0d3fd0415e81b63e317e457af9c55c46103ee [3] https://www.mercurial-scm.org/repo/hg/file/5.2.2/mercurial/url.py#l176 Differential Revision: https://phab.mercurial-scm.org/D7962
-
Matt Harbison authored
This is less ugly than passing an open callback to the `httpsendfile` constuctor. Differential Revision: https://phab.mercurial-scm.org/D7961
-
- Jan 15, 2020
-
-
Martin von Zweigbergk authored
In the same vein as the previous patch. Differential Revision: https://phab.mercurial-scm.org/D7901
-
Martin von Zweigbergk authored
I find it hard to understand what value to pass for all the arguments to `merge.update()`. I would like to introduce functions that are more specific to each use-case. We already have `graft()`. This patch introduces a `clean_update()` and uses it in some places to show that it works. Differential Revision: https://phab.mercurial-scm.org/D7902
-
- Feb 05, 2020
-
-
Augie Fackler authored
Prior to this fix, manifestdict.walk() with an exact matcher would blindly list the files in the matcher, even if they weren't in the manifest. This was exposed by my next patch where I rewrite filesnotin() to use walk() instead of matches(). Differential Revision: https://phab.mercurial-scm.org/D8081
-
- Feb 06, 2020
-
-
Kyle Lippincott authored
My previous fix did not fully fix the issue: it would attempt to use %-formatting to combine two strs into a bytes, which won't work. Let's just switch the entire function to operating in strs. This can cause a small output difference that will likely not be noticed since no one noticed that the method wasn't working at all before: if `id` or `type` are not-None, they'll be shown as `b'val'` instead of `val`. Since this is a debugging aid and these strings shouldn't be shown to the user, slightly rough output is most likely fine and it's likely not worthwhile to add the necessary conditionals to marginally improve it. Differential Revision: https://phab.mercurial-scm.org/D8091
-
- Nov 17, 2019
-
-
Pierre-Yves David authored
The rust version of Mercurial is not currently tested by anything else. So it get quite important that developer runs it. Differential Revision: https://phab.mercurial-scm.org/D8017
-
- Nov 16, 2019
-
-
Pierre-Yves David authored
These are usually rarely run by individual developper because they are slow. However it is important that they stay happy. Differential Revision: https://phab.mercurial-scm.org/D8016
-
- Jan 25, 2020
-
-
Pierre-Yves David authored
The usual tests should be run too. We skip the "tests-check*.t" one because their are already covered by another Ci step. Differential Revision: https://phab.mercurial-scm.org/D8015
-
- Nov 18, 2019
-
-
Pierre-Yves David authored
The Rust code has various standard rust test that are fast to run. So let's run them. Differential Revision: https://phab.mercurial-scm.org/D8014
-
- Nov 16, 2019
-
-
Pierre-Yves David authored
Python3 is the future^W present, it is important to run tests with it too. Differential Revision: https://phab.mercurial-scm.org/D8013
-
- Jan 24, 2020
-
-
Pierre-Yves David authored
The run result are nicer to read with color. Differential Revision: https://phab.mercurial-scm.org/D8012
-