From 2c43656a160197df935f38f832c0990025be9d83 Mon Sep 17 00:00:00 2001 From: Mike Drob Date: Wed, 20 Jun 2018 15:23:03 -0700 Subject: [PATCH] HBASE-20764 build broken when latest commit is gpg signed Signed-off-by: Andrew Purtell --- dev-support/submit-patch.py | 13 ++++++------- hbase-common/src/saveVersion.sh | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dev-support/submit-patch.py b/dev-support/submit-patch.py index ad3949530e4..352b1ba433c 100755 --- a/dev-support/submit-patch.py +++ b/dev-support/submit-patch.py @@ -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 } diff --git a/hbase-common/src/saveVersion.sh b/hbase-common/src/saveVersion.sh index abb8c5bcff8..730224f0d65 100644 --- a/hbase-common/src/saveVersion.sh +++ b/hbase-common/src/saveVersion.sh @@ -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