Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 22:55:11 -0500] rev 51387
crecord: enable search hotkeys (
issue6834)
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 <jordigh@octave.org> [Wed, 14 Feb 2024 22:54:21 -0500] rev 51386
crecord: add handle(next|prev)search functions
These are now just simple wrappers around `searchdirection`
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 22:53:58 -0500] rev 51385
crecord: add a searchdirection function
If a regex has already been previously set, this function handles the
UI elements of searching again forward or backward.
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 22:50:00 -0500] rev 51384
crecord: add a handlesearch function
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 <jordigh@octave.org> [Wed, 14 Feb 2024 22:48:09 -0500] rev 51383
crecord: add a showsearch function
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 <jordigh@octave.org> [Wed, 14 Feb 2024 22:46:41 -0500] rev 51382
crecord: add a default regex to curseschunkselector
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 <jordigh@octave.org> [Wed, 14 Feb 2024 22:43:51 -0500] rev 51381
crecord: add `content` properties to all nodes
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 <jordigh@octave.org> [Wed, 14 Feb 2024 22:42:08 -0500] rev 51380
crecord: update uiheader docstring
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 <jordigh@octave.org> [Wed, 14 Feb 2024 22:40:47 -0500] rev 51379
crecord: add skipfolded param to previtem
This just simplifies the API a bit so it matches `nextitem` and I
can handle both nextitem and previtem symmetrically.
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 14 Feb 2024 15:23:59 -0500] rev 51378
dispatch: don't attempt to import debugger as bytestring
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 <jordigh@octave.org> [Wed, 14 Feb 2024 11:53:04 -0500] rev 51377
debugsetparents: fix Marmoutian docstring
Just some light proofreading.
Martin von Zweigbergk <martinvonz@google.com> [Tue, 13 Feb 2024 11:49:55 -0800] rev 51376
docs: fix broken `make` in `docs/`
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.
Arseniy Alekseyev <aalekseyev@janestreet.com> [Wed, 10 Jan 2024 18:58:42 +0000] rev 51375
branchmap: use mmap for faster revbranchcache loading
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
Manuel Jacob <me@manueljacob.de> [Fri, 02 Feb 2024 04:46:54 +0100] rev 51374
hghave: add py312 and py313
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 <me@manueljacob.de> [Fri, 02 Feb 2024 04:23:07 +0100] rev 51373
hghave: use strings instead of floats for version numbers passed to checkvers
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.
Manuel Jacob <me@manueljacob.de> [Sat, 03 Feb 2024 23:45:08 +0100] rev 51372
py3: fully port doctest to py3
Manuel Jacob <me@manueljacob.de> [Fri, 02 Feb 2024 04:03:15 +0100] rev 51371
import-checker: make stdlib path detection work in virtual environments
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 <me@manueljacob.de> [Fri, 02 Feb 2024 03:39:37 +0100] rev 51370
cleanup: remove unnecessary list constructor calls around list comprehensions
Raphaël Gomès <rgomes@octobus.net> [Mon, 12 Feb 2024 16:22:47 +0100] rev 51369
branching: merge stable into default
Raphaël Gomès <rgomes@octobus.net> [Mon, 12 Feb 2024 16:17:08 +0100] rev 51368
Added signature for changeset
3fd1efb3ad12
Raphaël Gomès <rgomes@octobus.net> [Mon, 12 Feb 2024 16:16:10 +0100] rev 51367
Added tag 6.6.3 for changeset
3fd1efb3ad12
Raphaël Gomès <rgomes@octobus.net> [Mon, 12 Feb 2024 16:14:18 +0100] rev 51366
relnotes: add 6.6.3
Arseniy Alekseyev <aalekseyev@janestreet.com> [Mon, 08 Jan 2024 15:25:33 +0000] rev 51365
tests: fix nondeterministic test failure in test-contrib-perf.t
It turns out (not too shockingly!) the kernel sometimes has some work to do,
perhaps at the very least context-switching, so asserting the system time
is 0.000000 doesn't work.
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Thu, 01 Feb 2024 19:35:35 -0500] rev 51364
grep: restore usage of --include/--exclude options
The refactor in
4a73df6eb67d accidentally forgot to transform the opts
argument for walkopts into a byteskwargs. This resulted in its options
being ignored. In particular, the -X/-I pair of options was missing.
A simple fix restores its usage. Tests included, of course.
Arun Kulshreshtha <akulshreshtha@janestreet.com> [Tue, 30 Jan 2024 22:14:02 +0000] rev 51363
rust-changelog: don't panic on empty file lists
Anton Shestakov <av6@dwimlabs.net> [Wed, 24 Jan 2024 13:49:29 -0300] rev 51362
tests: use sha256line.py instead of /dev/random in test-censor.t (
issue6858)
Sometimes the systems that run our test suite don't have enough entropy and
they cannot produce target file of the expected size using /dev/random, which
results in test failures. Switching to /dev/urandom would give us way more
available data at the cost of it being less "random", but we don't really need
to use entropy for this task at all, since we only care if the file size after
compression is big enough to not be stored inline in the revlog. So let's use
something that we already have used to generate this kind of data in other
tests.
Anton Shestakov <av6@dwimlabs.net> [Wed, 24 Jan 2024 13:35:30 -0300] rev 51361
tests: make sha256line.py available for all tests
This was previously only used in test-revlog-delta-find.t, but it will be
useful (and used) in other tests that might need to generate
poorly-compressible files.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 22:51:01 +0100] rev 51360
delta-find: pass the full deltainfo to the _DeltaSearch class
Having more information is better, so we pass it directly.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 05:20:00 +0100] rev 51359
delta-find: move sparse-revlog pre-filtering in the associated class
Lets move the specialized code in the specialized class.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 05:16:08 +0100] rev 51358
delta-find: move sparse-revlog delta checks in the associated class
Lets move the specialized code in the specialized class.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 04:39:18 +0100] rev 51357
delta-find: split the _DeltaSearch class in two
We now have things sliced small enough to have two class that use different
`_iter_groups` implementation to encode their different logic.
The filtering code remains to be moved, but I would rather keep this changeset
simple and move them in the next.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 22:40:11 +0100] rev 51356
delta-find: finish reworking the snapshot logic and drop more layer
The refining logic only applies to the snapshot logic, and this is now all
contained in a dedicated method.
Along the way, we drop the refined_groups // raw_groups layer as they no longer
make sense. The result is a more explicit `iter_groups` method.
This conclude the splitting and simplification of the groups generation.
We are now ready to dispatch this in more diverse classes.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 22:29:02 +0100] rev 51355
delta-find: move the base of the delta search in its own function
That logic is complicated enough that is is worth puting in its own function. Another method will be introduced in the next changeset to deal with the actual refining.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 21:44:51 +0100] rev 51354
delta-find: move the emotion of prev in a dedicated method
After splitting the filtering, and with the `_candidate_groups` layer removed,
we can start splitting the group generation too. This helps to organize this
code and make it easier to modifying the future.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 21:51:43 +0100] rev 51353
delta-find: move the emotion of parents in a dedicated method
After splitting the filtering, and with the `_candidate_groups` layer removed,
we can start splitting the group generation too. This helps to organize this
code and make it easier to modifying the future.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 03:08:46 +0100] rev 51352
delta-find: explicitly deal with usage of the cached revision
We can remove this from the general logic path and directly deal with this
corner case early.
This result in a small change in test-generaldelta.t as it turns out that:
- at commit time we (sometimes) precompute a delta against p1 and pass it as the
cached delta.
- since cached delta where going through the same filtering as everything, we
could "optimize" the base if it applied to an empty delta, resulting in not
using the pre-computed delta.
The simpler logic fix the second item, making the cached delta base always actually
tested when requested.
Note that the computation of a fast delta against p1 only is questionable, but
looking into that is out of scope for this series.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 03:02:30 +0100] rev 51351
delta-find: remove the "candidate groups" layer
We have enough pieces to remove this generator and directly bear it load using
the underlying object.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 03:13:36 +0100] rev 51350
delta-find: stop using heuristic to determine if we are creating a snapshot
This avoid assuming a changeset is a snapshot when it is actually something
simpler.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 02:38:38 +0100] rev 51349
delta-find: explicitly track stage of the search
Being more explicit about what we are doing is going to be useful. We actually
start making use of it in later changesets.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 23 Nov 2023 20:09:34 +0100] rev 51348
delta-find: drop some dead debug code
Seems like it was never put to use, so lets simply remove it for now.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 03:34:27 +0100] rev 51347
delta-find: introduce and use specialized _DeltaSearch class
For now, we introduce some very simple variant, but they are still useful to
display how having the class can helps keeping the simple case simple and
their special case out of more advanced logic.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 01:05:10 +0100] rev 51346
delta-find: introduce a base class for _DeltaSearch
This prepare the introduction of specialized the class in the next changesets.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 03:23:24 +0100] rev 51345
delta-find: simplify the delta checking function for snapshot
Since the function is all about snapshot, we can safely use an early return and
make the result simpler.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 07 Jan 2024 00:56:15 +0100] rev 51344
delta-find: move good delta code earlier in the class
Nothing change except the code location. This greatly helps readability of the
next future diff,
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 Jan 2024 17:20:30 +0100] rev 51343
delta-find: split is_good_delta_info into more thematic function
Same logic as for candidate filtering, we group code into related sub method.
This will help clarifying later patches as some logic is pre-splitted
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 Jan 2024 15:35:57 +0100] rev 51342
delta-find: clarify some comment and code in is_good_delta_info
We move the comment closer to the code it describ and we compute an
intermediate value without using the `textlen` variable, as it will stop being
defined in a future patch.
This will clarify future patches.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 Jan 2024 15:35:36 +0100] rev 51341
delta-find: move delta size check earlier in is_good_delta_info
This will clarify future patches by regrouping related logic before larger
movement.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 04 Jan 2024 15:04:10 +0100] rev 51340
delta-find: split the delta-chain part of `_pre_filter_rev` in a method
Since `_pre_filter_rev` contains logic from various sources of constraint, we
start splitting is in subfunction to clarify and document the grouping.