diff --git a/scripts/common.py b/scripts/common.py index 26f6af0a327d6ba3412b422749a2be0b6d0784be..cd1b8b4b81467080618af6b33ef98a1808ae0a5b 100755 --- a/scripts/common.py +++ b/scripts/common.py @@ -163,8 +163,14 @@ def commit_and_push( """Commit and push to a repo branch""" branch = repo.head.reference author = Actor(name, email) + + logging.debug("Committing changes:") + logging.debug(repo.git.diff("--staged")) + repo.index.commit(message, author=author, committer=author) - print(repo.git.log("--oneline", "-n", "5")) + + logging.debug("Git log:") + logging.debug(repo.git.log("--oneline", "-n", "5")) # Push commit try: @@ -179,7 +185,7 @@ def commit_and_push( print("Pushed new commit:") print(project.web_url + "/-/commit/" + revision) if not less_verbose: - print(repo.git.show("--summary", "--decorate")) + print(repo.git.show("--summary", "--decorate") + "\n") return revision diff --git a/scripts/integrate_into_manifest.py b/scripts/integrate_into_manifest.py index f943991b261ea9c01cef19b5c47391a685081d92..c64918146e74062c62f03baf348d26b688f52372 100755 --- a/scripts/integrate_into_manifest.py +++ b/scripts/integrate_into_manifest.py @@ -71,12 +71,12 @@ def update_srcrev(srcrev, recipe_name, new_revision): def integrate_into_manifest( - manifest_project, + manifest_project: Project, integration_base, manifest_file, srcrev_file, recipe_name, - project, + project: Project, merge_request, ): gitlab = manifest_project.manager.gitlab @@ -92,6 +92,7 @@ def integrate_into_manifest( # Checkout manifest # TODO replace checkout with gitlab api access + print("Cloning manifest repo: %s" % manifest_project.http_url_to_repo) try: manifest_repo = Repo.clone_from( clone_url.url, manifest_dir, branch=integration_base @@ -115,7 +116,8 @@ def integrate_into_manifest( ) logging.debug("Heads: %s", manifest_repo.heads) manifest_repo.heads[integration_branch].checkout() - print(manifest_repo.git.log("--oneline", "-n", "5")) + logging.debug(manifest_repo.git.log("--oneline", "-n", "5")) + print("Using existing integration branch: %s" % integration_branch) else: # Create integration branch (delete former one if already exists) integration_branch = common.integration_branch_name( @@ -125,7 +127,7 @@ def integrate_into_manifest( if integration_branch == ref.name: manifest_repo.delete_head(ref) - logging.debug("Integration branch: %s", integration_branch) + print("Creating integration branch: %s" % integration_branch) manifest_repo.head.set_reference( manifest_repo.create_head(integration_branch) )