Commit 4fb9222b 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.
parent d1aba8b71579
Pipeline #9351 waiting for manual action with stage
...@@ -322,5 +322,5 @@ ...@@ -322,5 +322,5 @@
out.strip out.strip
end 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) def parse_gitlab_branch_for_hg(gitlab_branch)
...@@ -326,12 +326,5 @@ ...@@ -326,12 +326,5 @@
def parse_gitlab_branch_for_hg(gitlab_branch) def parse_gitlab_branch_for_hg(gitlab_branch)
if gitlab_branch.start_with?('branch/') Gitlab::Mercurial.parse_gitlab_branch_for_hg(gitlab_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
end end
def hg_branchmap_branch(hg_branch, topic) def hg_branchmap_branch(hg_branch, topic)
......
Supports Markdown
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