[yocto] [[PATCH][qa-tools] 15/16] toaster/helpers.py: Fix ToasterHelper setup method git checkout.
Aníbal Limón
anibal.limon at linux.intel.com
Tue Feb 9 14:45:19 PST 2016
When try to checkout from branch to another branch it fails because
this operation isn't permited.
So first create a branch before checkout.
Example:
git checkout jethro -b tmp
fatal: Cannot update paths and switch to branch 'tmp' at the same time.
Did you intend to checkout 'jethro' which can not be resolved as commit?
Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
toaster/helpers.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/toaster/helpers.py b/toaster/helpers.py
index dca594f..489a60f 100644
--- a/toaster/helpers.py
+++ b/toaster/helpers.py
@@ -66,8 +66,8 @@ class ToasterHelper(object):
subprocess.check_output([SHELL_CMD, "-c", "git clone %s %s" % \
(self.repo, self.directory)], stderr=subprocess.STDOUT)
- self._execute_command("git checkout %s -b %s" % \
- (self.repo_ref, TOASTER_TEST_BRANCH))
+ self._execute_command("git checkout %s; git branch %s; git checkout %s;" \
+ % (self.repo_ref, TOASTER_TEST_BRANCH, TOASTER_TEST_BRANCH))
def setup(self):
self._execute_command("virtualenv %s" % VENV_NAME)
--
2.1.4
More information about the yocto
mailing list