- Feb 22, 2024
-
-
Pierre-Yves David authored
Everything is already public, so we have nothing to do here.
-
- Feb 21, 2024
-
-
Pierre-Yves David authored
There are no boundary to retract, so lets do nothing.
-
- Feb 20, 2024
-
-
Pierre-Yves David authored
Node-id are expensive to work with, dealing with revision is much simple and faster. The fact we still used node-id here shows how few effort have been put into making the phase logic fast. We tend to no longer use node-id internally for about ten years. This has a large impact of repository with many draft roots. For example this Mozilla-try copy have ½ Million draft roots and `perf::unbundle` see a significant improvement. ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.perf.perf-unbundle # bin-env-vars.hg.flavor = no-rust # bin-env-vars.hg.py-re2-module = default # benchmark.variants.issue6528 = disabled # benchmark.variants.revs = last-1 before:: 1.746791 seconds after:: 1.278379 seconds (-26.82%) # benchmark.variants.revs = last-10 before:: 3.145774 seconds after:: 2.103735 seconds (-33.13%) # benchmark.variants.revs = last-100 before:: 3.487635 seconds after:: 2.446749 seconds (-29.85%) # benchmark.variants.revs = last-1000 before:: 5.007568 seconds after:: 3.989923 seconds (-20.32%)
-
Pierre-Yves David authored
This remove the need for the `filterunknown` method at all.
-
Pierre-Yves David authored
In the future change that move the internal representation of phase-roots from node-id to rev-num, we will use a repository to translate revision numbers back to node at write time. Since that future change is quite complicated already, we do this small API change beforehand.
-
Pierre-Yves David authored
We are about to change its content from nodeid to revnum. So anyone directly using the content might be in unexpected troubles. We start by making it private to explicitly break any such user (and discourage them to do so).
-
Pierre-Yves David authored
There is an official function for this, lets use it. This will prevent the code to break in the future while we refactor the phase code.
-
Pierre-Yves David authored
Explicit is better than implicit. The current logic is bit subtle and fragile. It also get in the way of using something else than node-id as internal storage. We replace it with a more explicit filtering while striping.
-
- Feb 23, 2024
-
-
Pierre-Yves David authored
The code have different behavior when the unbundle comes from a push, so we introduce a command that can simulate such unbundle. For our copy of mozilla-try-2023-03-22, this make the unbundle jump from 2.5 seconds (with `hg unbundle`) to 15 seconds (with `hg debug::unbundle`). That 15 seconds timings is consistent with the issue seen in production.
-
- Feb 14, 2024
-
-
Zeger Van de Vannet authored
-
- Feb 12, 2024
-
-
Arseniy Alekseyev authored
Python implementation of `headrevsdiff` can be very slow in the worst case compared with the `heads` computation it replaces, since the latter is done in Rust. Even the average case of this Python implementation is still noticeable in the profiles. This patch makes the computation much much faster by doing it in Rust.
-
- Dec 21, 2023
-
-
Arseniy Alekseyev authored
Python implementation of `headrevsdiff` can be very slow in the worst case compared with the `heads` computation it replaces, since the latter is done in C. Even the average case of this Python implementation is still noticeable in the profiles. This patch makes the computation much much faster by doing it in C.
-
Arseniy Alekseyev authored
To compute the set of changed heads it's sufficient to look at the recent commits, instead of looking at all heads currently in existence.
-
- Feb 21, 2024
-
-
Raphaël Gomès authored
-
Pierre-Yves David authored
`bytes(<int>)` gives a very different result as `str(<int>)` and the display of `hg debugformat` have been broken for a while as a result.
-
- Feb 20, 2024
-
-
Arun Kulshreshtha authored
-
- Feb 15, 2024
-
-
Arun Kulshreshtha authored
-
- Feb 14, 2024
-
-
Jordi Gutiérrez Hermoso authored
I noticed that the `hg topics` template has a bare `topic` label with no dot, and that makes it useless, as such a label will never receive any effect by the colour extension. This dot has been required for a long time, at least since 2011, but we never formally documented it!
-
- Feb 15, 2024
-
-
Jordi Gutiérrez Hermoso authored
The keys I chose here should be similar to less/vim keybindings, which should fit the overall keybinding theme of crecord.
-
Jordi Gutiérrez Hermoso authored
These are now just simple wrappers around `searchdirection`
-
Jordi Gutiérrez Hermoso authored
If a regex has already been previously set, this function handles the UI elements of searching again forward or backward.
-
Jordi Gutiérrez Hermoso authored
This function sets up some of the UI, such as getting the search string from the user and displaying results or their absence.
-
Jordi Gutiérrez Hermoso authored
This function takes a regex and searches either forward or backward, moving the current item to the found item, if any, and unfolding the relevant context.
-
Jordi Gutiérrez Hermoso authored
Whether there is a regex to search or not will affect if we can find the next or the previous search hit.
-
Jordi Gutiérrez Hermoso authored
In order to have a unified API of what can be searched, let's provide a `content` property to each node type. This way we can search filenames, context headers (e.g. containing function names, if deducible from patch context) or changed lines themselves.
-
Jordi Gutiérrez Hermoso authored
There's no need to move anything to patch.py. The uiheader class only has methods relevant to crecord and overrides __getattr__ in order to use `patch.header` objects as a sort of mixin.
-
Jordi Gutiérrez Hermoso authored
This just simplifies the API a bit so it matches `nextitem` and I can handle both nextitem and previtem symmetrically.
-
Arseniy Alekseyev authored
the test apparently sometimes prints the word "start" as a part of profile, so let's no longer match "start": CHGHG=/*/install/bin/hg (glob) + \x1b[90m | 50.0% 0.01s profiling.py: __enter__ line 196: self.start()\x1b[0m (esc) + \x1b[90m | 50.0% 0.01s profiling.py: start line 261: self._profiler.__enter__()\x1b[0m (esc) + \x1b[90m | 50.0% 0.01s profiling.py: statprofile line 125: statprof.start(mechanism=b'...\x1b[0m (esc) + \x1b[90m | 50.0% 0.01s statprof.py: start line 356: state.thread.start()\x1b[0m (esc) + \x1b[90m | 50.0% 0.01s threading.py: start line 852: self._started.wait()\x1b[0m (esc)
-
Arseniy Alekseyev authored
Also reduce the duplication in the tricky code that uses PyList_Append by extracting it into a function `pylist_append_owned`.
-
- Feb 14, 2024
-
-
Jordi Gutiérrez Hermoso authored
The __import__ thingie needs a string, not a bytestring. Guess I'm the only one who uses this once in a while and noticed it was broken.
-
Jordi Gutiérrez Hermoso authored
Just some light proofreading.
-
- Feb 13, 2024
-
-
Martin von Zweigbergk authored
We had some wrapped lines without blank lines between, which made the runrst script think the list was not a list and it got confused about the indentation. I added blank lines, and also some other minor styling for consistency with the rest of the file.
-
- Jan 10, 2024
-
-
Arseniy Alekseyev authored
A typical revbranchmap usage is: - load the entire revbranchmap file into memory - maybe do a few lookups - add a few bytes to it - write the addition to disk There's no reason to load the entire revbranchmap into memory. We can split it into a large immutable prefix and a mutable suffix, and then memorymap the prefix, thus saving all the useless loading. Benchmarking on some real-world pushes suggests that out of ~100s server-side push handling revbranchcache handling is responsible for: * ~7s with no change * ~1.3s with the change, without mmap * 0.04s with the change, with mmap
-
- Feb 02, 2024
-
-
Manuel Jacob authored
While not required in the core test suite in the moment, these could be useful in the future or for extensions. For example, Python 3.12 removed distutils and it might make sense to differentiate based on that.
-
Manuel Jacob authored
I think it’s a really bad idea to use floats for version numbers. One problem is that 3.10 is the same as 3.1.
-
- Feb 03, 2024
-
-
Manuel Jacob authored
-
- Feb 02, 2024
-
-
Manuel Jacob authored
The previous logic tried to find the directory containing BaseHTTPServer, which didn’t work as indended because it was only present on Python 2. Instead, the argparse module is used now.
-
Manuel Jacob authored
-
- Feb 12, 2024
-
-
Raphaël Gomès authored
-
Raphaël Gomès authored
-