Repository: mesos Updated Branches: refs/heads/master dff60a0b9 -> e9b5e0300
Fixed `push-commits.py` for Windows. This script didn't work even before the port to Python 3, as `os.path.join` cannot be used for joining URL components, as the filesystem path separator on Windows is a backslash. Review: https://reviews.apache.org/r/67551/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/e9b5e030 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/e9b5e030 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/e9b5e030 Branch: refs/heads/master Commit: e9b5e03005f3b3cc74bc43c63884d188c7bbefb2 Parents: dff60a0 Author: Andrew Schwartzmeyer <and...@schwartzmeyer.com> Authored: Wed Jun 13 10:18:55 2018 -0700 Committer: Andrew Schwartzmeyer <and...@schwartzmeyer.com> Committed: Wed Jun 13 10:18:55 2018 -0700 ---------------------------------------------------------------------- support/python3/push-commits.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/e9b5e030/support/python3/push-commits.py ---------------------------------------------------------------------- diff --git a/support/python3/push-commits.py b/support/python3/push-commits.py index ef63d1a..b346dcf 100755 --- a/support/python3/push-commits.py +++ b/support/python3/push-commits.py @@ -36,6 +36,7 @@ import argparse import os import re import sys +import urllib.parse from subprocess import check_output @@ -62,8 +63,9 @@ def get_reviews(revision_range): pos = commit_log.find('Review: ') if pos != -1: - pattern = re.compile('Review: ({url})$'.format( - url=os.path.join(REVIEWBOARD_URL, 'r', '[0-9]+'))) + regex = 'Review: ({url})$'.format( + url=urllib.parse.urljoin(REVIEWBOARD_URL, 'r/[0-9]+')) + pattern = re.compile(regex) match = pattern.search(commit_log.strip().strip('/')) if match is None: print("\nInvalid ReviewBoard URL: '{}'".format(