summaryrefslogtreecommitdiff
path: root/git-mirror-gitlab-ce
diff options
context:
space:
mode:
Diffstat (limited to 'git-mirror-gitlab-ce')
-rwxr-xr-xgit-mirror-gitlab-ce16
1 files changed, 13 insertions, 3 deletions
diff --git a/git-mirror-gitlab-ce b/git-mirror-gitlab-ce
index feb8602..1c628e8 100755
--- a/git-mirror-gitlab-ce
+++ b/git-mirror-gitlab-ce
@@ -121,7 +121,7 @@ class GitLabCE < GitMirrorBackend
end
info = JSON::parse(res.body)
end
- return self.get_meta
+ return nil
end
def repo_mode
@@ -133,6 +133,7 @@ class GitLabCE < GitMirrorBackend
def cmd_config(*args)
args.each do |arg|
key, val = arg.split('=', 2)
+ key = key.gsub('-', '_')
case key
when "apiurl"
val = URI(val)
@@ -142,19 +143,28 @@ class GitLabCE < GitMirrorBackend
end
@config[key] = val
end
+ return nil
end
def cmd_get_meta(project_id)
- return self.project(project_id).get_meta()
+ map = self.project(project_id).get_meta()
+ ret = {}
+ map.each do |key,val|
+ key = key.gsub('_', '-')
+ map[key] = val
+ end
+ return ret
end
def cmd_set_meta(project_id, *pairs)
map = {}
pairs.each do |pair|
key, val = arg.split('=', 2)
+ key = key.gsub('-', '_')
map[key] = val
end
- return self.project(project_id).set_meta(map)
+ self.project(project_id).set_meta(map)
+ return nil
end
def cmd_push_url(project_id)