HBASE-20764 build broken when latest commit is gpg signed

Signed-off-by: Andrew Purtell <apurtell@apache.org>
This commit is contained in:
Mike Drob 2018-06-20 15:23:03 -07:00
parent 17bd935301
commit 302b77697a
No known key found for this signature in database
GPG Key ID: 3E48C0C6EF362B9E
2 changed files with 7 additions and 8 deletions

View File

@ -171,17 +171,16 @@ def validate_patch_dir(patch_dir):
# - current branch is same as base branch
# - current branch is ahead of base_branch by more than 1 commits
def check_diff_between_branches(base_branch):
only_in_base_branch = git.log("HEAD.." + base_branch, oneline = True)
only_in_active_branch = git.log(base_branch + "..HEAD", oneline = True)
only_in_base_branch = list(repo.iter_commits("HEAD.." + base_branch))
only_in_active_branch = list(repo.iter_commits(base_branch + "..HEAD"))
if len(only_in_base_branch) != 0:
log_fatal_and_exit(" '%s' is ahead of current branch by %s commits. Rebase "
"and try again.", base_branch, len(only_in_base_branch.split("\n")))
"and try again.", base_branch, len(only_in_base_branch))
if len(only_in_active_branch) == 0:
log_fatal_and_exit(" Current branch is same as '%s'. Exiting...", base_branch)
if len(only_in_active_branch.split("\n")) > 1:
if len(only_in_active_branch) > 1:
log_fatal_and_exit(" Current branch is ahead of '%s' by %s commits. Squash into single "
"commit and try again.",
base_branch, len(only_in_active_branch.split("\n")))
"commit and try again.", base_branch, len(only_in_active_branch))
# If ~/.apache-creds is present, load credentials from it otherwise prompt user.
@ -277,7 +276,7 @@ if args.jira_id is not None:
# Use jira summary as review's summary too.
summary = get_jira_summary(issue_url)
# Use commit message as description.
description = git.log("-1", pretty="%B")
description = repo.head.commit.message
update_draft_data = {"bugs_closed" : [args.jira_id.upper()], "target_groups" : "hbase",
"target_people" : args.reviewers, "summary" : summary,
"description" : description }

View File

@ -38,7 +38,7 @@ if [ -d .svn ]; then
revision=`svn info | sed -n -e 's/Last Changed Rev: \(.*\)/\1/p'`
url=`svn info | sed -n -e 's/^URL: \(.*\)/\1/p'`
elif [ -d .git ]; then
revision=`git log -1 --pretty=format:"%H"`
revision=`git log -1 --no-show-signature --pretty=format:"%H"`
hostname=`hostname`
url="git://${hostname}${cwd}"
else