- May 10, 2022
-
-
Georges Racinet authored
-
Georges Racinet authored
This should also be applicable in other methods.
-
Georges Racinet authored
The only use case of `repo_path_for_creation()` was to feed `hg_init_repository()`. It is simpler for callers not to have to.
-
Georges Racinet authored
-
Georges Racinet authored
We will soon switch `hg_init_repository` to exception raising. This takes care of the new `try` statement and the related indentation.
-
Georges Racinet authored
The existing functions such as `not_found()` are useful for a quick and early return, but they are impractical for mutualization or chaining (this is not Rust, we have neither the `Result<T, E>` type nor the `?` operator for easy propagation).
-
Georges Racinet authored
Extracting this from `RepositoryService` will help avoid duplication in forthcoming methods. Also, as usual, implementation details such as compatibility with unpython3inic constraints of Mercurial core do not belong to the service method itself.
-
- May 16, 2022
-
-
Georges Racinet authored
-
Georges Racinet authored
We'll have protocol changes, and new needed methods (related or not to protocol changes), some of which are already implemented.
-
- May 04, 2022
-
-
Georges Racinet authored
Closes #90 We don't take care of the sort options, postponing them to #97 instead. This is enough for heptapod#534 (`gitaly-backup`)
-
- May 06, 2022
-
-
Georges Racinet authored
We're keeping a uniform API with other refs (branches and tags), although we'll probably use `deref=False` almost exclusively.
-
- May 04, 2022
-
-
Georges Racinet authored
Now that the API for tags and branches is uniform, these sorting keys will be more widely useful.
-
- May 08, 2022
-
-
Georges Racinet authored
Same rationale as in 73e9ff17ca2e
-
- May 06, 2022
-
-
Georges Racinet authored
The `after` parameter was always interpreted as if `sort_by` was `FULL_REF_NAME`.
-
Georges Racinet authored
Some gRPC methods don't need to resolve the commits. This can be useful for performance reasons (a bit premature) but also for robustness (case of `ListRefs`, being used as of GitLab 14.8 for backups only). Also the beginning of an effort to normalize HGitaly hexadecimal node ids to `str`, as it is often what the protocol ends up specifying, hence we have conversions littering the service methods.
-
- May 04, 2022
-
-
Georges Racinet authored
Nowadays, we have Gitaly Comparison tests to check that kind of thing. The kind of error really suggests that the condition is quite unexpected upstream. Probably the client is already fed with a correct tag in the first place. Anyway, now we are in sync with upstream.
-
Georges Racinet authored
This moves all implementation details from `RefService` to `hgitaly.tag`. This has the drawback of resolving change contexts even when not needed. We could improve later by relying on the GitLab tags state file, which would guarantee uniformity with what the Rails app sees in its pre/post-receive hooks.
-
Georges Racinet authored
Such implementation details do not belong in a service class.
-
- Apr 28, 2022
-
-
Georges Racinet authored
Closes #95 This is in advance of the HGitaly3 milestone, but needed for gitaly-backup (removal occurs before restoration). We don't attempt to provide the same level of locking as Gitaly does, both because this is not the best time to handle locking for mutation methods and because this is a special case, but we split the work into atomic rename and cleanup (cheap to implement). See also heptapod#534
-
- Apr 29, 2022
-
-
Georges Racinet authored
In the process, the `ServiceFixture` class gains a few more utilities to handle repositories directly and the cleanup code paths are now covered. Also an opportunity to use mercurial_testhelpers features that were introduced since the writing of many of these tests, such as `LocalRepoWrapper.load()`. Also applying general coding style that avoids bound variables (when reasonable).
-
Georges Racinet authored
This will help make common patterns more uniform. The `__init__` super dance is not the most elegant code ever written, but using classmethods wouldn't be so much of an improvement.
-
- Apr 28, 2022
-
-
Georges Racinet authored
The immediate need is to implement `RepositoryService.RemoveRepository()`, but there are other potential use cases, same as with Gitaly.
-
Georges Racinet authored
It will be reused soon for other purposes than finding a repository path
-
- Oct 09, 2021
-
-
Sushil Khanchi authored
-
Sushil Khanchi authored
(amended by gracinet to leverage the `gen_bundle_responses()` introduced by parent changeset)
-
- Mar 30, 2022
-
-
Georges Racinet authored
This new `gen_bundle_responses()` will be reused with different options for `CreateBundleFromRefList`
-
- Oct 09, 2021
-
-
Sushil Khanchi authored
This func will be used by upcoming tests of CreateRepositoryFromRefList().
-
- Aug 28, 2021
-
-
Sushil Khanchi authored
-
- Mar 29, 2022
-
-
Sushil Khanchi authored
Rebased and amended by gracinet
-
Georges Racinet authored
This `hg_init_repository` method was introduced for `CreateRepositoryFromBundle` and is also appropriate here
-
Sushil Khanchi authored
Rebased and amended by gracinet from the original version by Sushil. Things have changed upstream, with better uniformity in error treatment. The test case where the repo creation fails after the initial path checks is now a bit more convoluted, as explained in comments. Also some simplifications in tests.
-
Georges Racinet authored
This is a more focused version of 009b7fb9f27a (that will probably be replaced by the present changeset). Factorizing more is subject to the problem that different errors (or no error) may have to be returned in other services/methods. OTOH we can expect all creation methods to have consistent behaviour, and it's actually become more the case with Gitaly≥14.6, in which all repository creation methods return the `ALREADY_EXISTS` gRPC error (used to be a mixed of two different errors and no error before that). Also the message does not have to repeat information about the gRPC method that was actually called, since the proper response type is used (and caller-side logging will include the method anyway).
-
- Mar 21, 2022
-
-
Georges Racinet authored
-
Georges Racinet authored
-
- Mar 20, 2022
-
-
Georges Racinet authored
Despite coincidence between the all caps name used in doc with the actual name of the argument in other cases, it seems that we need to use the corresponding string value in the `#define` for the all caps name. This is a case where documentation is very lacking (didn't find anything explicit about that in API doc for Python `grpcio`).
-
- Mar 14, 2022
-
-
Georges Racinet authored
-
Georges Racinet authored
-
- Mar 13, 2022
-
-
Georges Racinet authored
This solves the "Too many pings" error (usually an aggravation of exceptional conditions).
-