From: Alfredo Deza Date: Mon, 18 Jan 2016 18:19:06 +0000 (-0500) Subject: fix unbound local errors X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a4ea208a138f796deece9197cf33358ae61e70c7;p=ceph-build.git fix unbound local errors Signed-off-by: Alfredo Deza --- diff --git a/ceph-pr-commits/build/test_commits.py b/ceph-pr-commits/build/test_commits.py index edfa8417..93366742 100644 --- a/ceph-pr-commits/build/test_commits.py +++ b/ceph-pr-commits/build/test_commits.py @@ -29,10 +29,10 @@ def run(command): def get_commits(): + target_branch = os.getenv('ghprbTargetBranch', 'master') # ensure that we have the latest commits from master command = ['git', 'fetch', 'origin', '+refs/heads/{target_branch}:refs/remotes/origin/{target_branch}'.format(target_branch=target_branch)] run(command) - target_branch = os.getenv('ghprbTargetBranch', 'master') # we use 'HEAD' here because the PR is already checked out on the right branch source_branch = 'HEAD' command = ['git', 'log', '--no-merges', 'origin/%s..%s' % (target_branch, source_branch)]