Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Commits
7dd314ab
Commit
7dd314ab
authored
Nov 06, 2017
by
Sebastien Robin
Committed by
Klaus Wölfel
Aug 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testnode: fix switch of branch when new branch name is a substring of previous one
parent
6ee0b765
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
erp5/tests/testERP5TestNode.py
erp5/tests/testERP5TestNode.py
+9
-0
erp5/util/testnode/Updater.py
erp5/util/testnode/Updater.py
+1
-1
No files found.
erp5/tests/testERP5TestNode.py
View file @
7dd314ab
...
...
@@ -341,6 +341,15 @@ shared = true
rev_list
=
self
.
getAndUpdateFullRevisionList
(
test_node
,
node_test_suite
)
output
=
call
(
"git branch"
.
split
()).
strip
()
self
.
assertTrue
(
"* bar"
in
output
.
split
(
'
\
n
'
))
# Add a fourth branch on remote, make sure we could switch to it
# this time the branch name is a substring of previous one (we had
# failure is such case at some point)
remote_call
=
self
.
getCaller
(
cwd
=
self
.
remote_repository2
)
output
=
remote_call
(
'git checkout master -b ba'
.
split
())
vcs_repository_info
[
'branch'
]
=
'ba'
rev_list
=
self
.
getAndUpdateFullRevisionList
(
test_node
,
node_test_suite
)
output
=
call
(
"git branch"
.
split
()).
strip
()
self
.
assertTrue
(
"* ba"
in
output
.
split
(
'
\
n
'
))
def
test_05c_changeRepositoryUrl
(
self
):
"""
...
...
erp5/util/testnode/Updater.py
View file @
7dd314ab
...
...
@@ -202,7 +202,7 @@ class Updater(object):
if self.branch and
\
not ("* %s" % self.branch in self._git('
branch
').split("
\
n
")):
# Delete branch if already exists
if self.branch in
self._git('
branch
')
:
if self.branch in
[x.strip() for x in self._git('
branch
').split("
\
n
")]
:
self._git('
branch
', '
-
D
', self.branch)
self._git('
checkout
', '
origin
/%
s
' % self.branch, '
-
b',
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