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
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.recipe.build
Commits
ab3bdcfb
Commit
ab3bdcfb
authored
Feb 02, 2015
by
Cédric de Saint Martin
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitclone: don't do anything at update() if develop=true.
parent
7b1548ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
19 deletions
+13
-19
slapos/recipe/gitclone.py
slapos/recipe/gitclone.py
+13
-19
No files found.
slapos/recipe/gitclone.py
View file @
ab3bdcfb
...
@@ -242,27 +242,21 @@ class Recipe(object):
...
@@ -242,27 +242,21 @@ class Recipe(object):
If user doesn't develop, reset to remote revision (or branch if revision is
If user doesn't develop, reset to remote revision (or branch if revision is
not specified).
not specified).
"""
"""
try
:
if
self
.
develop
:
# first cleanup pyc files
return
self
.
deletePycFiles
(
self
.
location
)
# then update
# first cleanup pyc files
check_call
([
self
.
git_command
,
'fetch'
,
'--all'
],
cwd
=
self
.
location
)
self
.
deletePycFiles
(
self
.
location
)
# If develop parameter is set, don't reset/update.
# then update
# Otherwise, reset --hard
check_call
([
self
.
git_command
,
'fetch'
,
'--all'
],
cwd
=
self
.
location
)
if
not
self
.
develop
:
if
self
.
revision
:
# If develop parameter is set, don't reset/update.
self
.
gitReset
(
self
.
revision
)
# Otherwise, reset --hard
else
:
if
self
.
revision
:
self
.
gitReset
(
'@{upstream}'
)
self
.
gitReset
(
self
.
revision
)
except
:
else
:
if
not
self
.
develop
:
self
.
gitReset
(
'@{upstream}'
)
raise
# Buildout will remove the installed location and mark the part as not
# installed if an error occurs during update. If we are developping this
# repository we do not want this to happen.
print
'Unable to update:
\
n
%s'
%
traceback
.
format_exc
()
def
uninstall
(
name
,
options
):
def
uninstall
(
name
,
options
):
"""Keep the working copy, unless develop is set to false.
"""Keep the working copy, unless develop is set to false.
...
...
Jérome Perrin
@jerome
mentioned in commit
208d689f
·
Oct 10, 2016
mentioned in commit
208d689f
mentioned in commit 208d689fbbf59d11b9d13ee845a6afad527ac4ab
Toggle commit list
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