Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-shell
Commits
3739a840
Commit
3739a840
authored
Apr 15, 2016
by
Robert Schilling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove branch functionality
parent
d5020c5c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
57 deletions
+1
-57
CHANGELOG
CHANGELOG
+1
-0
README.md
README.md
+0
-8
lib/gitlab_projects.rb
lib/gitlab_projects.rb
+0
-15
spec/gitlab_projects_spec.rb
spec/gitlab_projects_spec.rb
+0
-34
No files found.
CHANGELOG
View file @
3739a840
v3.0.0
- Remove list-remote-tags command (Robert Schilling)
- Remove rm-tag command (Robert Schilling)
- Remove create-branch and rm-branch commands (Robert Schilling)
v2.7.1
- Add new command to list tags from a remote repo
...
...
README.md
View file @
3739a840
...
...
@@ -104,14 +104,6 @@ Update HEAD:
./bin/gitlab-projects update-head gitlab/gitlab-ci.git 3-2-stable
Create branch:
./bin/gitlab-projects create-branch gitlab/gitlab-ci.git 3-2-stable master
Remove branch:
./bin/gitlab-projects rm-branch gitlab/gitlab-ci.git 3-0-stable
Create tag (lightweight & annotated):
./bin/gitlab-projects create-tag gitlab/gitlab-ci.git v3.0.0 3-0-stable
...
...
lib/gitlab_projects.rb
View file @
3739a840
...
...
@@ -50,8 +50,6 @@ class GitlabProjects
def
exec
case
@command
when
'create-branch'
;
create_branch
when
'rm-branch'
;
rm_branch
when
'create-tag'
;
create_tag
when
'add-project'
;
add_project
when
'list-projects'
;
puts
list_projects
...
...
@@ -114,19 +112,6 @@ class GitlabProjects
end
end
def
create_branch
branch_name
=
ARGV
.
shift
ref
=
ARGV
.
shift
||
"HEAD"
cmd
=
%W(git --git-dir=
#{
full_path
}
branch --
#{
branch_name
}
#{
ref
}
)
system
(
*
cmd
)
end
def
rm_branch
branch_name
=
ARGV
.
shift
cmd
=
%W(git --git-dir=
#{
full_path
}
branch -D --
#{
branch_name
}
)
system
(
*
cmd
)
end
def
create_tag
tag_name
=
ARGV
.
shift
ref
=
ARGV
.
shift
||
"HEAD"
...
...
spec/gitlab_projects_spec.rb
View file @
3739a840
...
...
@@ -68,40 +68,6 @@ describe GitlabProjects do
it
{
@gl_projects
.
instance_variable_get
(
:@full_path
).
should
==
"
#{
GitlabConfig
.
new
.
repos_path
}
/gitlab-ci.git"
}
end
describe
:create_branch
do
let
(
:gl_projects_create
)
{
build_gitlab_projects
(
'import-project'
,
repo_name
,
'https://github.com/randx/six.git'
)
}
let
(
:gl_projects
)
{
build_gitlab_projects
(
'create-branch'
,
repo_name
,
'test_branch'
,
'master'
)
}
it
"should create a branch"
do
gl_projects_create
.
exec
gl_projects
.
exec
branch_ref
=
capture_in_tmp_repo
(
%W(git rev-parse test_branch)
)
master_ref
=
capture_in_tmp_repo
(
%W(git rev-parse master)
)
branch_ref
.
should
==
master_ref
end
end
describe
:rm_branch
do
let
(
:gl_projects_create
)
{
build_gitlab_projects
(
'import-project'
,
repo_name
,
'https://github.com/randx/six.git'
)
}
let
(
:gl_projects_create_branch
)
{
build_gitlab_projects
(
'create-branch'
,
repo_name
,
'test_branch'
,
'master'
)
}
let
(
:gl_projects
)
{
build_gitlab_projects
(
'rm-branch'
,
repo_name
,
'test_branch'
)
}
it
"should remove a branch"
do
gl_projects_create
.
exec
gl_projects_create_branch
.
exec
branch_ref
=
capture_in_tmp_repo
(
%W(git rev-parse test_branch)
)
gl_projects
.
exec
branch_del
=
capture_in_tmp_repo
(
%W(git rev-parse test_branch)
)
branch_del
.
should_not
==
branch_ref
end
end
describe
:create_tag
do
let
(
:gl_projects_create
)
{
build_gitlab_projects
(
'import-project'
,
repo_name
,
'https://github.com/randx/six.git'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment