summaryrefslogtreecommitdiff
path: root/baserockimport
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-11-20 16:21:10 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-11-20 16:58:57 +0000
commit04120c4b661bf67d73803fdf697e423b8ce7d0ae (patch)
treebcd51b9016cc95cb16a21aec501bba98692cd03f /baserockimport
parent2669370c2a862ed0af973f5480c6b1a3a33db676 (diff)
downloadimport-04120c4b661bf67d73803fdf697e423b8ce7d0ae.tar.gz
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.
Diffstat (limited to 'baserockimport')
-rw-r--r--baserockimport/mainloop.py7
1 files changed, 7 insertions, 0 deletions
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(