Merge "show the branches containing the commit being tagged"

This commit is contained in:
Jenkins 2016-04-08 12:10:29 +00:00 committed by Gerrit Code Review
commit 990f760218

View File

@ -58,6 +58,14 @@ def git_log(workdir, repo, title, git_range, extra_args=[]):
print()
def git_branch_contains(workdir, repo, title, commit):
header('%s %s' % (title, commit))
cmd = ['git', 'branch', '-r', '--contains', commit]
print('\n' + ' '.join(cmd) + '\n')
subprocess.check_call(cmd, cwd=os.path.join(workdir, repo))
print()
def git_diff(workdir, repo, git_range, file_pattern):
repo_dir = os.path.join(workdir, repo)
files = list(glob.glob(os.path.join(repo_dir,
@ -190,6 +198,13 @@ def main():
ref=project['hash'],
)
git_branch_contains(
workdir=workdir,
repo=project['repo'],
title='Branches containing commit',
commit=project['hash'],
)
head_sha = gitutils.sha_for_tag(workdir, project['repo'], 'HEAD')
requested_sha = gitutils.sha_for_tag(
workdir,