Raphaël Gomès <rgomes@octobus.net> [Fri, 08 May 2020 01:19:48 +0200] rev 44812
formatting: add missing newline
Differential Revision: https://phab.mercurial-scm.org/D8509
Joerg Sonnenberger <joerg@bec.de> [Mon, 27 Apr 2020 01:39:22 +0200] rev 44811
fastexport: downgrade message about already exported changesets to debug
The old warning level is just too noisy for incremental processing.
Differential Revision: https://phab.mercurial-scm.org/D8487
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 May 2020 09:07:31 -0700] rev 44810
revisions: parse "x123" as "nodeid starting with 123" without prefixhexnode
`experimental.revisions.prefixhexnode` makes it so the template
function `shortest()` uses an "x" prefix to disambiguate between short
nodeids and revnums. That config has so far also been used for
enabling parsing of "x123" unambiguously as a nodeid. That makes it a
little annoying for people who have prefixhexnode=yes to share such
nodeids with people who have prefixhexnode=no ("x123" will be
considered invalid for them). There seems to be little harm in
allowing that parsing for everyone. We still let e.g. bookmark names
like "x123" take precedence over the nodeid, so that's not a
concern. The only thing I can think of is that people get used to the
"x" prefix being valid, making it impossible for us to change to a
different prefix if we wanted to do that when graduating the feature.
Differential Revision: https://phab.mercurial-scm.org/D8514
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 May 2020 08:55:35 -0700] rev 44809
status: use cmdutil.check_at_most_one_arg() for checking --rev/--change
There are apparently no tests for this either.
Differential Revision: https://phab.mercurial-scm.org/D8511
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 May 2020 08:50:47 -0700] rev 44808
diff: use cmdutil.check_at_most_one_arg() for checking --rev/--change
The same check was done in extdiff as well, so I fixed that too.
There are apparently no tests for this.
Differential Revision: https://phab.mercurial-scm.org/D8510
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 May 2020 11:40:17 -0700] rev 44807
copy: give better error message when no source paths found with --at-rev
The new error message matches what we show when marking copies in the
working copy.
Differential Revision: https://phab.mercurial-scm.org/D8496
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 May 2020 11:41:37 -0700] rev 44806
tests: show poor error message for `hg cp -A --at-rev . non-existent dst`
Differential Revision: https://phab.mercurial-scm.org/D8495
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 May 2020 10:33:56 -0700] rev 44805
copy: to find copy source, walk parent of revision we're marking copies in
As shown in the previous patch, `hg cp --after --at-rev . src dst`
fails if `src` is not in `.`. It seems obvious that you should always
walk the *parent* of the revision you're marking copies in, but that's
not how it was done for the working copy, and I didn't think to change
it when marking copies in a non-working-copy commit.
This patch fixes that by walking the parent commit instead, but only
if we're marking copies for a non-working-copy commit. We need to
leave the working-copy code unchanged because it depends on the weird
behavior of `workingctx.walk()`. With these changes, there's very
little overlap between the working-copy version and the
non-working-copy version of `walkpats()`, but I've refrained from
cleaning that up on the stable branch.
Differential Revision: https://phab.mercurial-scm.org/D8494
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 May 2020 11:41:01 -0700] rev 44804
tests: show that `hg cp -A --at-rev .` doesn't work for renames
I clearly forgot to implement (and test) support for marking of
renames when I added support for marking of copies :(
Differential Revision: https://phab.mercurial-scm.org/D8493
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 May 2020 14:33:46 +0200] rev 44803
rust-matchers: add TODO about incomplete `Display` for `IncludeMatcher`
This is purely for future reference, I don't think this is a problem right now,
since the `Display` is *only* used to ease debugging and has no real users.
Differential Revision: https://phab.mercurial-scm.org/D8492
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 May 2020 11:17:27 +0200] rev 44802
rust-filepatterns: match exact `rootglob`s with a `HashSet`, not in the regex
This optimization yields some very interesting results in `rootglob`-heavy
repositories.
I build a test repository of the following structure:
```
root
/<uuid>/build/empty_file
... repeat for 4000 entries
```
and a `.hgignore` containing the corresponding 4000 `rootglob` entries pointing
to all `build/` folders.
Rust+c `hg status` goes from 350ms down to 110ms.
Differential Revision: https://phab.mercurial-scm.org/D8491
Mitchell Plamann <mplamann@janestreet.com> [Wed, 15 Apr 2020 16:43:05 -0400] rev 44801
dirstate: force _checkexec to return a bool
posix.checkexec can return True, False, or None. The rust status
implementation expects a boolean, so make sure _checkexec returns a boolean.
Differential Revision: https://phab.mercurial-scm.org/D8432
Kyle Lippincott <spectral@google.com> [Tue, 21 Apr 2020 13:37:45 -0700] rev 44800
locking: wait for locks in `hg cp` and `hg mv`
I traced this back to revision 1822 (64df422), and there's no explanation why we
would prefer to error out instead of waiting for the locks.
Differential Revision: https://phab.mercurial-scm.org/D8464
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Apr 2020 05:37:54 +0200] rev 44799
nodemap: teach `hg debugformat` about the persistent nodemap option
We have a new requirement, we should display it.
Differential Revision: https://phab.mercurial-scm.org/D8430
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Apr 2020 18:58:35 +0200] rev 44798
upgrade: support the --quiet flag
The command is currently very verbose with a various bit of output being time
sensitive or randomized. The make invocation bulky and hard to match in the
test. We move various message from `ui.write` to `ui.status` in order for the
`--quiet` flag to have effect and helps the situation.
As a side benefit, we can replace the various redirection to > /dev/null with the --quiet flag.
Differential Revision: https://phab.mercurial-scm.org/D8429
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 15 Apr 2020 19:20:15 +0200] rev 44797
upgrade: clearly list optimisations
This makes the command operation clearer. And this will be necessary to have
a short version of this information with the next changesets, teaching `hg
debugupgraderepo` about `--quiet`.
Differential Revision: https://phab.mercurial-scm.org/D8428
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Apr 2020 04:23:20 +0200] rev 44796
nodemap: move the mode option to storage.revlog.nodemap.mode
The option stay experimental as long as the main feature is.
Differential Revision: https://phab.mercurial-scm.org/D8422
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Apr 2020 03:20:21 +0200] rev 44795
nodemap: move the option for mmap usage to storage.revlog.nodemap.mmap
The option is stay experimental as long as the main feature is.
Differential Revision: https://phab.mercurial-scm.org/D8421
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Apr 2020 04:08:46 +0200] rev 44794
nodemap: move and update the commend about persistence being experimental
The comment was at the wrong place (on the developer option instead of the
activation switch). So we move it at the right location and update it.
Differential Revision: https://phab.mercurial-scm.org/D8420
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Apr 2020 03:18:14 +0200] rev 44793
nodemap: move the main switch to the `format` section
The config to enable persistent nodemap is now `format.use-persistent-nodemap`.
However the option remain marked as experimental because it only improve
performance for people using the rust extensions.
Differential Revision: https://phab.mercurial-scm.org/D8419
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Apr 2020 03:27:04 +0200] rev 44792
nodemap: drop the 'exp-' prefix for internal opener option
The feature is now in a descent shape and we can consider having it "less"
experimental.
We won't be able to make it "totally" non-experimental, because its benefit
rely on rust, which is totally experimental.
Differential Revision: https://phab.mercurial-scm.org/D8418
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Apr 2020 03:16:23 +0200] rev 44791
nodemap: gate the feature behind a new requirement
Now that the feature is working smoothly, a question was still open, should we
gate the feature behind a new requirement or just treat it as a cache to be
warmed by those who can and ignored by other.
The advantage of using the cache approach is a transparent upgrade/downgrade
story, making the feature easier to move to. However having out of date cache
can come with a significant performance hit for process who expect an up to
date cache but found none. In this case the file needs to be stored under
`.hg/cache`.
The "requirement" approach guarantee that the persistent nodemap is up to date.
However, it comes with a less flexible activation story since an explicite
upgrade is required. In this case the file can be stored in `.hg/store`.
This wiki page is relevant to this questions:
https://www.mercurial-scm.org/wiki/ComputedIndexPlan
So which one should we take? Another element came into plan, the persistent
nodemap use the `add` method of the transaction, it is used to keep track of a
file content before a transaction in case we need to rollback it back. It turns
out that the `transaction.add` API does not support file stored anywhere than
`.hg/store`. Making it support file stored elsewhere is possible, require a
change in on disk transaction format. Updating on disk file requires…
introducing a new requirements.
As a result, we pick the second option "gating the persistent nodemap behind a
new requirements".
Differential Revision: https://phab.mercurial-scm.org/D8417
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Apr 2020 03:05:54 +0200] rev 44790
nodemap: move on disk file to version 1
The current format contains the information we need, lets freeze it before the
release.
Differential Revision: https://phab.mercurial-scm.org/D8416
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Apr 2020 03:01:52 +0200] rev 44789
nodemap: add a new mode value, "strict"
When "strict" is set, operation will refuse to use the slow path and abort if
they would. This is useful for testing, benchmarking and server operation.
Differential Revision: https://phab.mercurial-scm.org/D8415
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 14 Apr 2020 02:45:05 +0200] rev 44788
nodemap: add a new mode option, with an optional "warn" value
When "warn" is set, user will get notified when the slow code, used for
compatibility is used. This can help people to detect situation were using that
feature will give them a slowdown instead of a speedup.
Differential Revision: https://phab.mercurial-scm.org/D8414
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 05 Apr 2020 18:32:46 +0200] rev 44787
nodemap: also warm manifest nodemap with other caches
The `hg debugupdatecache` command now also warm the persistent nodemap for the
manifest (when applicable).
Differential Revision: https://phab.mercurial-scm.org/D8411
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 05 Apr 2020 13:12:05 +0200] rev 44786
nodemap: also use persistent nodemap for manifest
The manifest as a different usage pattern than the changelog. First, while the
lookup in changelog are not garanteed to match, the lookup in the manifest
nodemap come from changelog and will exist in the manifest. In addition, looking
up a manifest almost always result in unpacking a manifest an operation that
rarely come cheap.
Nevertheless, using a persistent nodemap provide a significant gain for some
operations.
For our measurementw, we use `hg cat --rev REV FILE` on the our reference
mozilla-try. On this repository the persistent nodemap cache is about 29 MB in
side for a total store side of 11,988 MB
File with large history (file: b2g/config/gaia.json, revision:
195a1146daa0)
no optimisation: 0.358s
using mmap for index: 0.297s (-0.061s)
persistent nodemap for changelog only: 0.275s (-0.024s)
persistent nodemap for manifest too: 0.258s (-0.017s)
File with small history (file: .hgignore, revision:
195a1146daa0)
no optimisation: 0.377s
using mmap for index: 0.296s (-0.061s)
persistent nodemap for changelog only: 0.274s (-0.022s)
persistent nodemap for manifest too: 0.257s (-0.017s)
Same file but using a revision (
8ba995b74e18) with a smaller manifest (3944829
bytes vs 10 bytes)
no optimisation: 0.192s (-0.185s)
using mmap for index: 0.131s (-0.061s)
persistent nodemap for changelog only: 0.106s (-0.025s)
persistent nodemap for manifest too: 0.087s (-0.019s)
Differential Revision: https://phab.mercurial-scm.org/D8410
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 05 Apr 2020 13:49:27 +0200] rev 44785
nodemap: create files in the repository used in the test
We need a manifest with more content to test persistent nodemap for manifest.
This change the repository content and affect all the hashes.
Differential Revision: https://phab.mercurial-scm.org/D8409
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 May 2020 10:10:13 +0200] rev 44784
rust-matchers: add timing tracing to regex compilation
This might be useful to diagnose later performance issues or just to show
the difference between engines.
Differential Revision: https://phab.mercurial-scm.org/D8498
Matt Harbison <matt_harbison@yahoo.com> [Sun, 26 Apr 2020 14:29:47 -0400] rev 44783
url: fix a bytes vs str crash in processing proxy headers (
issue6249)
I have no idea how to make a test for this, so if somebody knows, feel free to
add one or follow up on this. The bug reporter reported that it worked for
them, so there may not be other hidden issues here.
Differential Revision: https://phab.mercurial-scm.org/D8485