Commit 9873ea29 authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

HgGitRepository: removed duplication

We still have a deprecated compatibility alias, and the
rebase tests prove that it works.

--HG--
branch : heptapod
parent d1aba8b71579
Pipeline #9351 waiting for manual action with stage
......@@ -322,16 +322,9 @@ def hg_changeset_branch(hgsha)
out.strip
end
# TODO duplication use the one from Mercurial module
# TODO deprecated compatibility alias, replaced by direct calls
def parse_gitlab_branch_for_hg(gitlab_branch)
if gitlab_branch.start_with?('branch/')
[gitlab_branch[7..], nil]
elsif gitlab_branch.start_with?('topic/')
branch, _slash, topic = gitlab_branch[6..].rpartition('/')
[branch, topic]
else
raise StandardError, "bookmarks not supported (got #{gitlab_branch})"
end
Gitlab::Mercurial.parse_gitlab_branch_for_hg(gitlab_branch)
end
def hg_branchmap_branch(hg_branch, topic)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment