Commit bd07d150b43 by Georges Racinet

Url import: no need to cleanup remote

In mercurial, this would be called a path (see hg help paths),
but the pull we perform doesn't store it anyway.

--HG--
branch : heptapod
parent 0a3801d6258
......@@ -40,15 +40,6 @@ class GitlabProjectsHg
protected
def remove_origin_in_repo
return true
# TODO : this needs to be replaced with Hg equivalent
cmd = %W(git --git-dir=#{full_path} remote rm origin)
pid = Process.spawn(*cmd)
Process.wait(pid)
end
def mask_password_in_url(url)
result = URI(url)
result.password = "*****" unless result.password.nil?
......@@ -114,9 +105,8 @@ class GitlabProjectsHg
self.class.create_hooks(full_path)
# The project was imported successfully.
# Remove the origin URL since it may contain password.
remove_origin_in_repo
# Our `hg pull` does not store the URL anywhere (and `hg clone` would
# mask it for us)
true
end
end
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