- Oct 24, 2021
-
-
Georges Racinet authored
Now it compares the entire streams of responses and not just lists of commit ids. That being said, it's easy to make a test irrelevant with a bug that would have both Mercurial and Git return empty responses. Had to shoehorn somewhat the switch to sorting mode and back, using a custom attribute on `rpc_helper`, but that still works. Additional remarks: - if a changeset user is `testuser`, then Git puts `none@none` for the email address. - some assertions are now self-explanatory, we need less comments
-
Georges Racinet authored
It is now able to handle `..` and `...` ranges. Also, an incoming non-sha revision is now returned untouched: this will be useful for arguments that can be either symbolic (e.g., refs) and direct SHAs.
-
Georges Racinet authored
Discrepancy with Git found While refactoring the Gitaly Comparison tests for this method. It is possible that the `chunked` helper itself should do it systematically. We'll see.
-
Georges Racinet authored
This one is very direct.
-
Georges Racinet authored
The `rpc_helper` argument should be often useful, the `vcs` can be in some cases.
-
Georges Racinet authored
It probably doesn't change much in execution time, but it's clearer anyway.
-
Georges Racinet authored
With `rpc_helper.assert_compare`, it is no longer useful and has become a distraction to the reader.
-
Georges Racinet authored
This one demonstrates the case where one needs the `RpcHelper` instance in the normalizer, hence a chicken-and-egg problem that Python closure rules don't have a problem with. Still it would be better to introduce a `rpc_helper` argument to the normalizer. Also cheating a bit, relying on the fact that `hg2git(git_sha)` will always return `git_sha`. It would be better to introduce a `vcs` kwarg to normalizers. Both changes require changing all existing normalizers, so it be better be done in a follow-up.
-
- Oct 21, 2021
-
-
Georges Racinet authored
The upcoming conflict didn't happen, but that is probably because we forgot to add new comparison tests with pagination and sort. It will be probably easier with those new helpers
-
Georges Racinet authored
It is rather clear that these normalizations will be systematically needed. We could have introduced something similar to the `response_sha_attrs` argument of `RpcHelper()`, but it would have been a bit complicated to implement right now, as it would have to share some of the iteration logic with `message_to_git()`. Could be a subject for a subsequent refactoring, if we don't decide to tackle the differences before (but that requires HGitaly1 to be a thing of the past).
-
Georges Racinet authored
-
Georges Racinet authored
This is a just-released feature of mercurial-testhelpers. With the inner functions enclosing the `hg_repo` local variable we had to systematically redefine `hg_repo` upon each reload() or stop using that abbreviation. We chose the latter.
-
Georges Racinet authored
-
Georges Racinet authored
This follows the development patterns we've been using lately: a single bunch of request attributes is given to, e.g, the `assert_compare` method, which translates it to Git for Gitaly. Request translation is fairly simple, taking care of direct attributes that are declared to be commit SHAs. Before comparison, the Mercurial response is also translated to Git. This is done with a list of attribute dotted paths, with the special convention that a name ending in `[]` represents a list-like value on which iteration must happen (see example in `tests_with_gitaly/test_commit.py`). For cases where attributes are not comparable, or more generally acknowledged to differ, the `normalizer` callable can be used. It's not clear this makes tests easier to write, but it probably makes them easier to read. For the conversion of Mercurial SHAs to Git SHAs, we're accessing the hg-git class, which is a bit heavy-handed but gives us more chances to understand future incompatibility, as the on-disk format storage of the mapping is due to change in hg-git.
-
Georges Racinet authored
In case `ui.username` takes the default form (such as `user@localhost`), HGitaly presents it as `name=user` (and the obvious) `email=user@localhost` whereas hg-git sets the same value in `name` and `email`. We set an explicit default user with both name and email, instead of changing the logic in main code because: - this is not a real discrepancy between HGitaly and Gitaly (after all, it depends on hg-git, which is purely testing apparatus in this context). - it is implemented using the generic internal `hg_stringutil` helper - I believe it to be actually better than using an email address for name.
-
- Jul 20, 2021
-
-
Georges Racinet authored
Up to now, we've been simply been ignoring the offset provided by Mercurial and were not displaying any timezone on the resulting `Author` message. Gitaly comparison tests will be provided by work currently in progress to make comparison more systematic.
-
Georges Racinet authored
This should help reducing the boilerplate in comparison tests, while also making clear that the focus of them is the comparison, not the actual responses. For instance, we should not need to update expected values in the tests if Gitaly fixes a bug and we follow suit. We're using `test_find_ref_name()` to demonstrate. A possible next step would be to include commit id conversions in the `RpcHelper` class, or rather the fixture. Closes #56
-
- Sep 06, 2021
-
-
Georges Racinet authored
The expected response was actually in full ref form (as `refs/heads`). It is probable that the Rails app is resilient with respect to that. Gitaly response is sorted (bad for perf, but nothing obvious we can do, GitLab 14.2 will even introduce different sorting criteria). This RPC method was implemented before we had Gitaly Comparison tests, this underlines once more how crucial they are.
-
- Aug 24, 2021
-
-
Georges Racinet authored
-
Georges Racinet authored
-
Georges Racinet authored
This is empty, since the oldstable branch hasn't seen any real activity since Heptapod 0.20. Yet that's one item less to check for next releases.
-
- Aug 23, 2021
-
-
Georges Racinet authored
We have a bump of protocol, even if it looks to be orthogonal to Mercurial concerns
-
Georges Racinet authored
Notable differences: - The Golang library package path now based on the major version number (`/v14') - RPC methods for remote mirror updating (should be only in the push direction). - Removal of some Wiki methods.
-
- Aug 04, 2021
-
-
Georges Racinet authored
-
Georges Racinet authored
-
Georges Racinet authored
(should have been done before tag)
-
Georges Racinet authored
-
Georges Racinet authored
-
- Aug 03, 2021
-
-
Georges Racinet authored
-
- Jul 19, 2021
-
-
Georges Racinet authored
Closes #55 Since we're only removing special refs, comparison to Gitaly has to be understood as assuming that only special refs will be removed on the Git side, which we arrange for directly.
-
Georges Racinet authored
This `assert_compare()` makes for shorter assertion lines, whose meaning is hopefully quicker to grasp.
-
Georges Racinet authored
This should distract readers a bit less.
-
Georges Racinet authored
This will make forthcoming code for `except_prefix` easier to integrate.
-
Georges Racinet authored
Although the `repository_service` comes from Gitaly itself (proto file name), if we strip it down from the class, let's also do it for the module name.
-
- May 28, 2021
-
-
Sushil Khanchi authored
-
- May 31, 2021
-
-
Sushil Khanchi authored
-
- May 15, 2021
-
-
Sushil Khanchi authored
-
Sushil Khanchi authored
-