- Mar 17, 2024
-
-
Georges Racinet authored
This will be useful in CI for Heptapod Rails, avoiding a lenghty compilation job when unnecessary. Some users may find it useful as well.
-
Georges Racinet authored
On subsequent compilation in CI, this will help making sure that the result is really compiled from the tarball, and hence that the latter is fully self-contained.
-
Georges Racinet authored
Never hurts.
-
Georges Racinet authored
The Python implementation is straightforward. Of course, we have to conflate the three possible dates, and even use those of the target changeset, as we don't have creation dates for references (we could in the case of tags in some far future). In the Rust implementation, the key point is how to start with an ordinary async `spawn` and then use a separate thread (`spawn_blocking`) to open the changelog if needed. It turns out that doing this from the first spawned task is impossible (it claims that `spawn_blocking` or its avatar as `load_repo_and_then` is not `Send` as soon as we want to pass the vector to sort). So instead, we pipe a second channel if needed. It sounds a bit silly to chunk, reaggregate, and then rechunk after sorting, but it does not matter much in the grand scheme of things. Also attempts to move this new spawning to `rhgitaly::repository` were unconclusive: in the current state of things, it would force to preclone the entire request, which is probably not a big concern, but still unsatisfactory, given that we only need the sort options (in this case, but not in a generic version). This is all complicated by the error about not being `Send` that gets displayed systematically if there are other errors (does not help knowing whether it will be true at the end when experimenting). We'll leaving it as is for now, and wait to have more use cases to try and do better.
-
Georges Racinet authored
It can be used for more than just putting in a `GitCommit` message.
-
- Mar 14, 2024
-
-
Georges Racinet authored
-
- Mar 12, 2024
-
-
Georges Racinet authored
-
Georges Racinet authored
-
Georges Racinet authored
-
Georges Racinet authored
No actual change in the subset implemented by RHGitaly.
-
Georges Racinet authored
Version 16.9 of the protocol brings blob OIDs in`FindChangedPathsResponse`, so we needed to implement them. Comparison tests make sure the results are correct, we didn't need to add assertion about blob OIDs in the existing ordinary tests to maintain coverage
-
- Mar 11, 2024
-
-
Georges Racinet authored
-
- Mar 10, 2024
-
-
Georges Racinet authored
While it is true there are two many changes for a patch version, 1.2.0 was already released to match Gitaly 16.8. It does not matter so much, and there is a possibility that HGitaly 1.1.3 never gets released).
-
Georges Racinet authored
-
Georges Racinet authored
The Rust version in the Heptapod base CI image has been 1.73 for some while, now. There were some new lints to pass, except that in our opinion keeping explicit lifetimes that can be elided is sometimes better (had to fix a nasty bug once because the elision rule was doing what the author thought). This is worth a minor version bump
-
Georges Racinet authored
Too much new implementations in RHGitaly for a patch version
-
Georges Racinet authored
Ensuring that our understanding of `git-for-each-ref(1)` and `fnmatch(3)` is correct.
-
Georges Racinet authored
This is useful, e.g., to start following RHGitaly logs
-
- Mar 09, 2024
-
-
Georges Racinet authored
-
Georges Racinet authored
-
Georges Racinet authored
Borrows a lot of code from hg-core glob patterns. The `RefPattern` enum performs the same matching as `git-for-each-ref`.
-
Georges Racinet authored
As noted in the Python implementation, the fact that `HEAD` is never emitted if the other refs are excluded by patterns is probably a side effect, but it is actually simpler to implement it in our case, because it helps with the Comparison tests.
-
Georges Racinet authored
At this points, this ignores all filtering except that if patterns is `["refs/heads"]` then one knows that only branch refs have to be returned. As we do not need to open the changelog yet (will have to for sorting based on dates, which is not implemented in Python either), we go the full async way, relying on the previously introduced helpers and on the `async-stream` crates, which provides implementations for the `Stream` trait with no need to define the state struct as is the case for ordinary iterators (the `yield` keyword is even reminiscent of the Python syntax). But this is at the price of putting some code out of reach of `rustfmt`.
-
Georges Racinet authored
This new method does a bit less than `get_gitlab_default_branch` and can be used as fast async (yet somewhat fuzzy) way to know if the repository is empty.
-
- Mar 08, 2024
-
-
Georges Racinet authored
Nothing done yet as of the actual implementation.
-
- Mar 10, 2024
-
-
Georges Racinet authored
-
- Mar 09, 2024
-
-
Georges Racinet authored
All error cases in this function were actually `StateFileError`. It is true it can be transparently converted to `RefError` but the latter will be inappropriate in the upcoming `ListRefs` inner implementation, where `StateFileError` is the only considered one.
-
Georges Racinet authored
…and a performance note.
-
Georges Racinet authored
They can be useful besides for concatenation purposes.
-
Georges Racinet authored
Up to know, all the streaming gRPC methods we implemented have been using the `spawn_blocking` pattern, but some `RefService` methods will not need to actually open repositories, changelogs etc, hence will be implemented with async tasks (`tokio::spawn`). This defines types shortcuts and reexposes `send()` with the only possible error treatment in case the channel is broken: logging it.
-
- Mar 08, 2024
-
-
Georges Racinet authored
Some motivation for making a macro or something.
-
- Mar 07, 2024
-
-
Georges Racinet authored
Closes #53
-
- Sep 18, 2023
-
-
Georges Racinet authored
Not so much to test, but that is better than nothing.
-
- Apr 01, 2021
-
-
Raphaël Gomès authored
Both where it's defined and in the test that uses this path.
-
- Mar 07, 2024
-
-
Georges Racinet authored
This reduces duplication in error treatment for Node prefixes that do not resolve, an area in which we hope `hg-core` will change.
-
Georges Racinet authored
This helps reduce the duplication in service code a bit, as the error treatment always turns out to be the same. It seems unlikely anything other than `Internal` could be useful if the changelog cannot be opened. It also uncovers that methods returning several blob or trees were reopening the changelog for each returned value and reduces that partially (not true in case of `get_blobs`). This is probably not much anyway for anything making use of the manifest, given how inefficient it is, but it may help in the future.
-
Georges Racinet authored
-
Georges Racinet authored
-
Georges Racinet authored
This is essentially trivial, since we are returning a constant. The Comparison test looks silly, but it is still useful, as it is the only thing proving that it actually works, and it forced us to return the same errors as Gitaly, which is obviously a good thing. We might want a direct HGitay vs RHGitaly comparison at some point, though. Closes #187
-
Georges Racinet authored
This could be important if upstream were to perform some optimization based on it.
-