Skip to content

Commit

Permalink
git.py: improving informativeness for YAMLProcessingError
Browse files Browse the repository at this point in the history
YAMLProcessingError now includes additional information about the
directory where a mismatch in repository branches was found.

Signed-off-by: Mykhailo Androsiuk <[email protected]>
  • Loading branch information
Mykhailo Androsiuk committed Nov 21, 2023
1 parent 6d06dec commit 244eae4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion moulin/fetchers/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def gen_fetch(self):
if self.git_rev != _SEEN_REPOS_REV[checkout_stamp]:
# Fail on occurrence of different revision for the already downloaded
# repository
raise YAMLProcessingError(f"ERROR: Repository {self.url} has two revisions '{self.git_rev}' "
raise YAMLProcessingError(f"ERROR: Repository {self.url} cloned to '{clone_target}' "
f"has two revisions '{self.git_rev}' "
f"and '{_SEEN_REPOS_REV[checkout_stamp]}'", self.conf["rev"].mark)
else:
# Do not checkout repos for the second time
Expand Down

0 comments on commit 244eae4

Please sign in to comment.