diff --git a/python/LbNightlyTools/CheckoutMethods.py b/python/LbNightlyTools/CheckoutMethods.py index 8b158fae84f6892e64c29968b21937d9f833ce5c..2ac0cd505b1dcc08710d865bbd50111c5b82620d 100644 --- a/python/LbNightlyTools/CheckoutMethods.py +++ b/python/LbNightlyTools/CheckoutMethods.py @@ -316,6 +316,14 @@ class GitRepository(object): cmd.extend(args) return Popen(cmd, cwd=self.path, stdout=PIPE).communicate()[0].strip() + def show_branch(self, *args): + ''' + Simple wrapper around "git show-branch". + ''' + cmd = ['git', 'show-branch'] + cmd.extend(args) + log_call(cmd, cwd=self.path) + class GitMergeHandler(GitRepository): ''' @@ -635,6 +643,11 @@ def git(proj, url=None, commit=None, export=False, merges=None): commit = 'HEAD' repo.tag(tag_name, commit=commit, force=True) repo.push_tag(tag_name, remote='lhcb-nightlies', force=True) + # report changes between the previous build and this one + repo.show_branch('--sha1-name', + '{0}/{1}'.format(proj.slot.name, + proj.slot.build_id - 1), + tag_name) except Exception, x: # pylint: disable=W0703 log.warning('failed to record built sources: %s', x) return _merge_outputs(outputs)