Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-11 21:41:02 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-02-11 21:41:02 +0400
commit2a1fac9e4f9687d4b55f13527aed5dfb848e3a4d (patch)
tree13c2e0071d578ed6d4290294f7cbc16281d23172 /lib
parentea0cb39d63cb193179338b9348c40d59da5787b1 (diff)
add import repo gitlab_shell call
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/backend/shell.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/gitlab/backend/shell.rb b/lib/gitlab/backend/shell.rb
index a779e88d3b8..85fa5bda055 100644
--- a/lib/gitlab/backend/shell.rb
+++ b/lib/gitlab/backend/shell.rb
@@ -13,6 +13,17 @@ module Gitlab
system("/home/git/gitlab-shell/bin/gitlab-projects add-project #{name}.git")
end
+ # Import repository
+ #
+ # name - project path with namespace
+ #
+ # Ex.
+ # import_repository("gitlab/gitlab-ci", "https://github.com/randx/six.git")
+ #
+ def import_repository(name, url)
+ system("/home/git/gitlab-shell/bin/gitlab-projects import-project #{name}.git #{url}")
+ end
+
# Remove repository from file system
#
# name - project path with namespace