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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tristan Cavelier
erp5
Commits
19b687ab
Commit
19b687ab
authored
Nov 06, 2017
by
Sebastien Robin
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
a8b20f6e
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 @
19b687ab
...
...
@@ -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 @
19b687ab
...
...
@@ -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