Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.build
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Boxiang Sun
slapos.recipe.build
Commits
4bb995d6
Commit
4bb995d6
authored
Aug 30, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No need of 'no branch' condition
parent
199bd563
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
slapos/recipe/gitclone.py
slapos/recipe/gitclone.py
+5
-8
No files found.
slapos/recipe/gitclone.py
View file @
4bb995d6
...
@@ -49,9 +49,9 @@ class Recipe(object):
...
@@ -49,9 +49,9 @@ class Recipe(object):
if
not
self
.
url
:
if
not
self
.
url
:
raise
ValueError
(
'url parameter is mandatory.'
)
raise
ValueError
(
'url parameter is mandatory.'
)
if
self
.
revision
and
self
.
branch
:
if
self
.
revision
and
self
.
branch
!=
GIT_DEFAULT_BRANCH_NAME
:
# revision and branch options are incompatible
# revision and branch options are incompatible
raise
ValueError
(
'revision and branch parameters are set but are'
raise
ValueError
(
'revision and branch parameters are set but are
'
'incompatible. Please specify only one of them.'
)
'incompatible. Please specify only one of them.'
)
...
@@ -86,8 +86,8 @@ class Recipe(object):
...
@@ -86,8 +86,8 @@ class Recipe(object):
def
update
(
self
):
def
update
(
self
):
"""
"""
Do a git fetch.
Do a git fetch.
If user doesn't develop, reset to remote
HEAD (or revision or branch if
If user doesn't develop, reset to remote
revision (or branch if revision is
specified.)
not
specified.)
"""
"""
check_call
([
self
.
git_command
,
'fetch'
,
'--all'
],
cwd
=
self
.
location
)
check_call
([
self
.
git_command
,
'fetch'
,
'--all'
],
cwd
=
self
.
location
)
...
@@ -96,9 +96,6 @@ class Recipe(object):
...
@@ -96,9 +96,6 @@ class Recipe(object):
if
not
self
.
develop
:
if
not
self
.
develop
:
if
self
.
revision
:
if
self
.
revision
:
self
.
gitReset
(
self
.
revision
)
self
.
gitReset
(
self
.
revision
)
elif
self
.
branch
:
self
.
gitReset
(
'%s/%s'
%
(
GIT_DEFAULT_REMOTE_NAME
,
self
.
branch
))
else
:
else
:
self
.
gitReset
(
'%s/%s'
%
(
self
.
gitReset
(
'%s/%s'
%
(
GIT_DEFAULT_REMOTE_NAME
,
GIT_DEFAULT_BRANCH_NAME
))
GIT_DEFAULT_REMOTE_NAME
,
self
.
branch
))
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