From 04120c4b661bf67d73803fdf697e423b8ce7d0ae Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Thu, 20 Nov 2014 16:21:10 +0000 Subject: Report what ref and commit is being used for each component I think this makes it clearer what the tool is actually doing, and hopefully makes it clearer what the user should do in cases where the tool couldn't determine which ref to use and reports an error. --- baserockimport/mainloop.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/baserockimport/mainloop.py b/baserockimport/mainloop.py index 99391af..6de8449 100644 --- a/baserockimport/mainloop.py +++ b/baserockimport/mainloop.py @@ -207,6 +207,13 @@ class ImportLoop(object): source_repo, package) package.set_version_in_use(checked_out_version) + gitdir_name = os.path.relpath(source_repo.dirname) + if morphlib.git.is_valid_sha1(ref): + self.app.status("Using %s commit %s", gitdir_name, ref) + else: + self.app.status("Using %s ref %s (commit %s)", gitdir_name, ref, + source_repo.resolve_ref_to_commit(ref)) + # 2. Create a chunk morphology with build instructions. chunk_morph = self._find_or_create_chunk_morph( -- cgit v1.2.1