[oe-commits] [openembedded-core] branch master-next updated: oeqa/utils/gitarchive: Handle case where parent is only on origin
git at git.openembedded.org
git at git.openembedded.org
Mon Feb 25 09:28:51 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
The following commit(s) were added to refs/heads/master-next by this push:
new 2664c46 oeqa/utils/gitarchive: Handle case where parent is only on origin
2664c46 is described below
commit 2664c4644ca05c6a07117856259d9d92dbb29c97
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Mon Feb 25 09:26:42 2019 +0000
oeqa/utils/gitarchive: Handle case where parent is only on origin
The parent code currently assumed that any parent branch is locally
checked out which may not be the case.
Use the local branch by default but fall back to the origin. This
also means removing the later saftey check as the branch may not exist
locally.
This fixes the autobuilder resulttool test pushing code.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/utils/gitarchive.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py
index ff614d0..9520b2e 100644
--- a/meta/lib/oeqa/utils/gitarchive.py
+++ b/meta/lib/oeqa/utils/gitarchive.py
@@ -80,6 +80,8 @@ def git_commit_data(repo, data_dir, branch, message, exclude, notes, log):
# Create new commit object from the tree
parent = repo.rev_parse(branch)
+ if not parent:
+ parent = repo.rev_parse("origin/" + branch)
git_cmd = ['commit-tree', tree, '-m', message]
if parent:
git_cmd += ['-p', parent]
@@ -93,8 +95,6 @@ def git_commit_data(repo, data_dir, branch, message, exclude, notes, log):
# Update branch head
git_cmd = ['update-ref', 'refs/heads/' + branch, commit]
- if parent:
- git_cmd.append(parent)
repo.run_cmd(git_cmd)
# Update current HEAD, if we're on branch 'branch'
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list