From cd538bd800ef9182435cce40a0477afe53738a93 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Fri, 2 May 2014 15:41:17 -0400 Subject: [PATCH] Create edx remote if it doesn't exist --- scripts/release.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/release.py b/scripts/release.py index d74603c99a..23bf68f0a9 100755 --- a/scripts/release.py +++ b/scripts/release.py @@ -45,13 +45,16 @@ def make_parser(): def ensure_pr_fetch(): + remotes = git.remote().splitlines() + if not "edx" in remotes: + git.remote("add", "edx", "https://github.com/edx/edx-platform.git") # it would be nice to use the git-python API to do this, but it doesn't seem # to support configurations with more than one value per key. :( edx_fetches = git.config("remote.edx.fetch", get_all=True).splitlines() pr_fetch = '+refs/pull/*/head:refs/remotes/edx/pr/*' if pr_fetch not in edx_fetches: git.config("remote.edx.fetch", pr_fetch, add=True) - git.fetch() + git.fetch("edx") def default_release_date():