Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
ed27624b
Commit
ed27624b
authored
Jun 20, 2019
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testnode: Also reset the submodule when rollback the main module
parent
df6414a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
erp5/util/testnode/Updater.py
erp5/util/testnode/Updater.py
+6
-0
No files found.
erp5/util/testnode/Updater.py
View file @
ed27624b
...
@@ -188,11 +188,15 @@ class Updater(object):
...
@@ -188,11 +188,15 @@ class Updater(object):
h = revision[1]
h = revision[1]
if h != self._git('
rev
-
parse
', '
HEAD
'):
if h != self._git('
rev
-
parse
', '
HEAD
'):
self._git('
clean
', '
-
fdx
')
self._git('
clean
', '
-
fdx
')
self._git('
submodule
', '
foreach
', '
--
recursive
', self.git_binary, '
clean
', '
-
fdx
')
# For performance, it is ok to use '
git
reset
--
hard
',
# For performance, it is ok to use '
git
reset
--
hard
',
# theses days it is not slow like it was long time ago.
# theses days it is not slow like it was long time ago.
self._git('
reset
', '
--
hard
', h)
self._git('
reset
', '
--
hard
', h)
self._git('
submodule
', '
foreach
', '
--
recursive
', self.git_binary, '
reset
', '
--
hard
')
self._git('
submodule
', '
update
', '
--
init
', '
--
recursive
')
else:
else:
self._git('
clean
', '
-
fdx
')
self._git('
clean
', '
-
fdx
')
self._git('
submodule
', '
foreach
', '
--
recursive
', self.git_binary, '
clean
', '
-
fdx
')
if os.path.exists('
.
git
/
svn
'):
if os.path.exists('
.
git
/
svn
'):
self._git('
svn
', '
rebase
')
self._git('
svn
', '
rebase
')
else:
else:
...
@@ -205,6 +209,8 @@ class Updater(object):
...
@@ -205,6 +209,8 @@ class Updater(object):
self._git('
checkout
', '
origin
/%
s
' % self.branch, '
-
b',
self._git('
checkout
', '
origin
/%
s
' % self.branch, '
-
b',
self.branch)
self.branch)
self._git('
reset
', '
--
hard
', '
@
{
u
}
')
self._git('
reset
', '
--
hard
', '
@
{
u
}
')
self._git('
submodule
', '
foreach
', '
--
recursive
', self.git_binary, '
reset
', '
--
hard
')
self._git('
submodule
', '
update
', '
--
init
', '
--
recursive
')
self.revision = self._git_find_rev(self._git('
rev
-
parse
', '
HEAD
'))
self.revision = self._git_find_rev(self._git('
rev
-
parse
', '
HEAD
'))
elif self.getRepositoryType() == SVN_TYPE:
elif self.getRepositoryType() == SVN_TYPE:
# following code allows sparse checkout
# following code allows sparse checkout
...
...
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