Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

track sha of master in test_pr messages #2248

Merged
merged 1 commit into from
Aug 4, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions tools/test_pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def setup(self):
check_call(['git', 'pull', 'origin', 'master'])
except CalledProcessError :
check_call(['git', 'pull', ipy_http_repository, 'master'])
self.master_sha = check_output(['git', 'log', '-1', '--format=%h']).decode('ascii').strip()
os.chdir(basedir)

def get_branch(self):
Expand Down Expand Up @@ -125,7 +126,7 @@ def format_result(result):
return s

if self.pr['mergeable']:
com = self.pr['head']['sha'][:7] + " merged into master"
com = self.pr['head']['sha'][:7] + " merged into master (%s)" % self.master_sha
else:
com = self.pr['head']['sha'][:7] + " (can't merge cleanly)"
lines = ["**Test results for commit %s**" % com,
Expand All @@ -146,10 +147,12 @@ def print_results(self):
pr = self.pr

print("\n")
msg = "**Test results for commit %s" % pr['head']['sha'][:7]
if pr['mergeable']:
print("**Test results for commit %s merged into master**" % pr['head']['sha'][:7])
msg += " merged into master (%s)**" % self.master_sha
else:
print("**Test results for commit %s (can't merge cleanly)**" % pr['head']['sha'][:7])
msg += " (can't merge cleanly)**"
print(msg)
print("Platform:", sys.platform)
for result in self.results:
if result.passed:
Expand Down