Skip to content
Snippets Groups Projects
Commit 3c6b018d authored by Georges Racinet's avatar Georges Racinet
Browse files

FindCommit comparison tests: ensure only GitLab state files are used

Previously, the test was passing because the Python reference implementation
of HGitaly relies on `scmutil.revsingle` for revisions not found in GitLab
state files, including tags given in simple form (e.g. `v1.2.3`).

But RHGitaly will rely on the GitLab state files only, hence we need to
ensure that the tags state file contains the one we introduce, which is
shadowing in the short SHA case

The added GitLab sync has the effect of removing directly set tags that have
no Mercurial counterpart from the GitLab state file, that's why it has to occur
before `write_ref()` in this test of collision/shadowing were Mercurial and Git
tags must have different names.
parent bbca598e
No related branches found
No related tags found
3 merge requests!169Protocol v15.9 and stable branch merge",!163FindCommit comparison tests: ensure only GitLab state files are used,!162FindCommit comparison tests: ensure only GitLab state files are used
Pipeline #67777 passed
......@@ -269,6 +269,7 @@
for hg_sha_tag, git_sha_tag in ((hg_sha0, git_sha0),
(hg_sha0[:10], git_sha0[:10])):
wrapper.command('tag', hg_sha_tag, rev=hg_sha1)
wrapper.command('gitlab-mirror')
git_repo.write_ref(b'refs/tags/' + git_sha_tag, git_sha1)
assert rpc_helper.hg2git(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment