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

FindCommit Comparison tests: special refs and keep-arounds

parent 9dd82aae
No related branches found
No related tags found
2 merge requests!155Gitaly v15.7: Matching protocol and fixing Comparison tests,!154FindCommit Comparison tests
Pipeline #67165 passed
......@@ -221,7 +221,9 @@
ctx0 = wrapper.commit_file('foo')
wrapper.command('tag', b'start-tag', rev=ctx0.hex())
wrapper.commit_file('foo', topic='sampletop')
ctx1 = wrapper.commit_file('foo', topic='sampletop')
mr_ref_path, _ = fixture.write_special_ref(b'merge-requests/2/train',
ctx1.hex())
assert_compare(revision=ctx0.hex())
assert_compare(revision=b'branch/default')
......@@ -231,7 +233,15 @@
assert_compare(revision=b'start-tag')
assert_compare(revision=b'refs/tags/start-tag')
assert_compare(revision=b'refs/tags/unknown')
# TODO special refs and keep-arounds
assert_compare(revision=mr_ref_path)
hg_ka_ref_path, git_ka_ref_path = fixture.create_keep_around(ctx1.hex())
# assert_compare() not being able to convert the keep-around ref path from
# Mercurial to Git on the fly, we need to go lower level
hg_resp = rpc_helper.rpc('hg', revision=hg_ka_ref_path)
git_resp = rpc_helper.rpc('git', revision=git_ka_ref_path)
rpc_helper.normalize_responses(hg_resp, git_resp)
assert hg_resp == git_resp
# TODO cases of collision/shadowing
......
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