From b0576d1d41dc39fec379ad7a1f8e9b1cc6720627 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Mon, 18 Jan 2021 07:37:59 +0100 Subject: [PATCH] [IMP] forwardport: cherrypick logging Enable GIT_TRACE to try and get more information pertaining to the cherrypicking process during failure. Related to #449 --- forwardport/models/project.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/forwardport/models/project.py b/forwardport/models/project.py index 5017116d..e72f20f5 100644 --- a/forwardport/models/project.py +++ b/forwardport/models/project.py @@ -899,15 +899,20 @@ stderr: # config (global -c) or commit options don't really give access to # setting dates cm = commit['commit'] # get the "git" commit object rather than the "github" commit resource - configured = working_copy.with_config(env={ + env = { 'GIT_AUTHOR_NAME': cm['author']['name'], 'GIT_AUTHOR_EMAIL': cm['author']['email'], 'GIT_AUTHOR_DATE': cm['author']['date'], 'GIT_COMMITTER_NAME': cm['committer']['name'], 'GIT_COMMITTER_EMAIL': cm['committer']['email'], - }) + } + configured = working_copy.with_config(env=env) - conf = configured.with_config(stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=False) + conf = working_copy.with_config( + env={**env, 'GIT_TRACE': 'true'}, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, + check=False + ) # first try with default / low renamelimit r = conf.cherry_pick(commit_sha) logger.debug("Cherry-picked %s: %s\n%s\n%s", commit_sha, r.returncode, r.stdout.decode(), _clean_rename(r.stderr.decode()))