Commit 85dca5e4 authored by Georges Racinet's avatar Georges Racinet 🦑
Browse files

Removed old compatibility alias

--HG--
branch : heptapod
parent eb1ad6d43afd
......@@ -369,11 +369,6 @@ def hg_changeset_branch(hgsha)
out.strip
end
# TODO deprecated compatibility alias, replaced by direct calls
def parse_gitlab_branch_for_hg(gitlab_branch)
Gitlab::Mercurial.parse_gitlab_branch_for_hg(gitlab_branch)
end
def hg_branchmap_branch(hg_branch, topic)
if topic.nil?
hg_branch
......@@ -665,7 +660,8 @@ def hg_merge_changeset(user, source_hgsha, target_hgsha, message,
# A temporary protection against unwanted publication, see heptapod#284.
def forbid_merge_in_topic(target_branch)
target_topic = parse_gitlab_branch_for_hg(target_branch)[1]
target_topic = Gitlab::Mercurial.parse_gitlab_branch_for_hg(
target_branch)[1]
raise ArgumentError, "Merge Requests targeting topics aren't supported yet" unless target_topic.nil?
end
......@@ -726,7 +722,8 @@ def merge(user, source_sha, target_branch, message)
end
def can_be_merged?(source_sha, target_branch)
target_topic = parse_gitlab_branch_for_hg(target_branch)[1]
target_topic = Gitlab::Mercurial.parse_gitlab_branch_for_hg(
target_branch)[1]
return false unless target_topic.nil?
logprefix = "Mercurial.can_be_merged? for #{@relative_path} "\
......@@ -888,7 +885,7 @@ def rebase(
raise StandardError, "Rebasing between two different repos is not "\
"supported" unless remote_repository == self
topic = parse_gitlab_branch_for_hg(branch)[1]
topic = Gitlab::Mercurial.parse_gitlab_branch_for_hg(branch)[1]
raise HgError, "Only topics can be rebased" if topic.nil?
hg_exe = Gitlab.config.mercurial.bin_path
......@@ -1063,7 +1060,9 @@ def multi_action(user, branch_name:, message:, actions:,
start_branch_name ||= branch_name
start_hg_branch, start_topic = parse_gitlab_branch_for_hg(start_branch_name)
start_hg_branch, start_topic =
Gitlab::Mercurial.parse_gitlab_branch_for_hg(
start_branch_name)
# using the branchmap notation to perform just one update
start_hg = if empty?
nil
......@@ -1072,7 +1071,8 @@ def multi_action(user, branch_name:, message:, actions:,
end
commit_hgsha = hg_tmp_workdir(start_hg) do |share_path|
hg_branch, topic = parse_gitlab_branch_for_hg(branch_name)
hg_branch, topic = Gitlab::Mercurial.parse_gitlab_branch_for_hg(
branch_name)
if hg_branch != start_hg_branch
# doing this inconditionally would be more that just a waste of
# resources, it could reset the 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