diff options
author | Simon Westphahl <simon.westphahl@bmw.de> | 2023-03-24 11:34:48 +0100 |
---|---|---|
committer | Simon Westphahl <simon.westphahl@bmw.de> | 2023-03-24 11:34:48 +0100 |
commit | 183d221124b506df4a3d227bfb81488eb8609b3e (patch) | |
tree | f52594cde4d788202b9bfb8057209bc0589b807b | |
parent | dd8ad88b8e2f1bd25ac1009111cae0eebfc89233 (diff) | |
download | zuul-183d221124b506df4a3d227bfb81488eb8609b3e.tar.gz |
Log commit SHA when getting files from repo
From the previous log messages related to a cat job it wasn't clear
which HEAD SHA was used to get the file content.
This change adds a log message to the `getFiles()` method that contains
the HEAD commit SHA.
Change-Id: I02a3a97f9b3dfa70f6e55954ea6ef365289f0046
-rw-r--r-- | zuul/merger/merger.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/zuul/merger/merger.py b/zuul/merger/merger.py index 1df833bc5..845925bfa 100644 --- a/zuul/merger/merger.py +++ b/zuul/merger/merger.py @@ -722,9 +722,11 @@ class Repo(object): ret = {} repo = self.createRepoObject(zuul_event_id) if branch: - tree = repo.heads[branch].commit.tree + head = repo.heads[branch].commit else: - tree = repo.commit(commit).tree + head = repo.commit(commit) + log.debug("Getting files for %s at %s", self.local_path, head.hexsha) + tree = head.tree for fn in files: if fn in tree: if tree[fn].type != 'blob': |