- Mar 12, 2021
-
-
Georges Racinet authored
-
Georges Racinet authored
Found out about this while testing with the Rails app. Of course, it is natural for symbolic refs, and doesn't sound very logical with normal refs, a result of under-specification ultimately due to the fact that Gitaly simply uses `git update-ref`. We keep refusing ref target revisions for keep-arounds because we are much surer that the Rails app will only use full SHAs as target revisions. Also, it swallows exceptions, avoiding failures if `WriteRef` refuses to create the keep-around (see `Gitlab::Git::KeepAround`). We should have a Gitaly comparison test for this, but we already have RSpec tests in the Rails app, so this can be in a follow-up.
-
Georges Racinet authored
The work to support special refs is well worth a minor version update.
-
- Mar 11, 2021
-
-
Georges Racinet authored
Usually, I would stand against wide exception catching, even with proper logging. But in this case, we're about (Heptapod 0.20.2) to have the Rails app repeat all special refs creations to HGitaly, and it should soon (Heptapod 0.21) even be the case for non-native Mercurial projects. Currently (HGitaly 0.9), all special refs creation do fail for native Mercurial projects, and that is no problem, with a major exception: Merge Requests refs are created by an actual Git fetch and are really needed.
-
Georges Racinet authored
reminder: all current projects handled with HGitaly have a Git repo.
-
Georges Racinet authored
Closes #52
-
Georges Racinet authored
Without an explicit return, it was giving a gRPC error
-
- Mar 09, 2021
-
-
Georges Racinet authored
-
- Mar 10, 2021
-
-
Georges Racinet authored
Closes #50
-
- Mar 03, 2021
-
-
Georges Racinet authored
This will support direct special refs creation from the Rails app, but not the indirect ones, such as created in the Git case by `FetchSourceBranch`. Keep-arounds are taken into account. Also we still don't enforce the existence of the special refs state file yet (see discussion about transitional aspects in heptapod#431). Closes #48
-
Georges Racinet authored
except keep-arounds for which it's unlikely to be useful (py-heptapod only allows to list them)
-
Georges Racinet authored
See heptapod#431 for more explanations about what we call special refs, and the problem to solve. This depends on primitives in py-heptapod that are currently unreleased, whence the version bump. We don't enforce the existence of the special refs state file yet.
-
- Mar 10, 2021
-
-
Georges Racinet authored
-
- Mar 03, 2021
-
-
Georges Racinet authored
We'll need both the `str` and the `bytes` case. For balance of pleasure and pain, SHA-2 is accepted.
-
- Mar 11, 2021
-
-
Georges Racinet authored
Lately these jobs haven't been running for MR pipelines. Let's try and force it by explicit rules. Also, have check-sdist run only for MR pipelines and pushes to the main development branches.
-
- Mar 09, 2021
-
-
Georges Racinet authored
RepositoryService: refactoring to put on par with current code base See merge request !46
-
Georges Racinet authored
Also done long ago in py-heptapod, with a compatibility alias.
-
Georges Racinet authored
It has long been moved to `hgext3rd.heptapod`, exactly for the reasons of that old TODO we're resolving here.
-
Georges Racinet authored
In the forthcoming implementations, having both a `ref` and a `revision` will make things a bit obscure. `target` will often be a SHA, so let's called the parsed target branch `target_branch`
-
- Mar 03, 2021
-
-
Georges Racinet authored
Will make it easier to add more of them.
-
Georges Racinet authored
This error helper was introduced after these early service methods.
-
- Mar 06, 2021
-
-
Georges Racinet authored
This mentions in particular the just introduced environment variable to skip the Gitaly comparison tests. Closes #45
-
Georges Racinet authored
-
Georges Racinet authored
This can be useful to reproduce drops in coverage, while staying in HDK context.
-
- Mar 04, 2021
-
-
Georges Racinet authored
This is the convention used by the Rails application, for instance in ```ruby def diff_from_parent_request_params(commit, options = {}) parent_id = commit.parent_ids.first || Gitlab::Git::EMPTY_TREE_ID diff_between_commits_request_params(parent_id, commit.id, options) end ``` Without such a special case, HGitaly was returning an error. This change gets at least one of the Heptapod functional tests to pass. Testing shows that Gitaly also accepts the right commit id to be EMPTY_TREE_OID to express the absence of commit. This is probably less useful, but we're also implementing it for the sake of completeness.
-
Georges Racinet authored
Since `parse_diff_request` is used by several RPCs, it is useful for the error logging to include indication of which one was called. Using the request class name does the trick.
-
- Mar 05, 2021
-
-
Sushil Khanchi authored
-
- Feb 24, 2021
-
-
Georges Racinet authored
-
Georges Racinet authored
extract_tree_oid can now receive a commit OID and returns `None` as path in that case, making it detectable.
-
Georges Racinet authored
Thinking that straight tuples could be used was naive
-
Georges Racinet authored
Among tree/blob OIDs, there was no ambiguity not to use a separator between the changeset ID and the path parts. But some RPC calls can accept commit OIDs, and these were not discernable from the corresponding root tree OIDs. This is also a bit more future-proof, not assuming changeset IDs to be SHA-1.
-
Georges Racinet authored
Using an actual variable for `repo` makes it easier to give a comment explaining why it is `None`.
-
Georges Racinet authored
It can probably be improved depending on ordering promises of the manifest, and the possibility to use treemanifest at some point. This is still partial, because `path` can really be any Git pathspec, and we don't honour the "literal pathspecs" option (the current one is in `GlobalOptions`). Closes #14
-
- Mar 01, 2021
-
-
Georges Racinet authored
This is a shortcut, simpler than the other ones in `message` but the fully qualified name, `ListLastCommitsForTreeResponse.CommitForTree` makes hard to respect the 80 columns mark.
-
Georges Racinet authored
Some repeated patterns of data extraction have been spotted in the current ongoing experiments. That's not surprising: Gitaly is after all modelled on Git responses.
-
- Feb 24, 2021
-
-
Georges Racinet authored
It will be reused in the forthcomming implementation of ListLastCommitsForTree
-
Georges Racinet authored
-
Georges Racinet authored
This will make callers more readable, as `None if ctx is None else message.commit(ctx)` was becoming fairly common.
-
Georges Racinet authored
-
- Feb 27, 2021
-
-
Sushil Khanchi authored
Here we are only comparing for error cases, as HGitaly returns Hg patches and Gitaly returns Git pataches. For more, look at diff.RawPatch()
-