You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2016/07/21 23:31:12 UTC
incubator-impala git commit: Adjust ASF push script names to match
our repo setup.
Repository: incubator-impala
Updated Branches:
refs/heads/master b94f88a69 -> e2a70388f
Adjust ASF push script names to match our repo setup.
Our gerrit repo is not Impala, but ImpalaASF:
https://gerrit.cloudera.org/#/q/status:open+project:ImpalaASF
Some Impala devlopers already use "gerrit" as a remote name for the
Impala gerrit repo, so use asf-impala as the git remote name.
Change-Id: Icea354314c37b2047c2e7f7c4ff2e0d036dff58b
Reviewed-on: http://gerrit.cloudera.org:8080/3702
Reviewed-by: Matthew Jacobs <mj...@cloudera.com>
Tested-by: Internal Jenkins
Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/e2a70388
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/e2a70388
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/e2a70388
Branch: refs/heads/master
Commit: e2a70388f5e5aef3160470d1bc6ca03897238706
Parents: b94f88a
Author: Jim Apple <jb...@cloudera.com>
Authored: Wed Jul 20 14:15:11 2016 -0700
Committer: Tim Armstrong <ta...@cloudera.com>
Committed: Thu Jul 21 16:31:09 2016 -0700
----------------------------------------------------------------------
bin/push_to_asf.py | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/e2a70388/bin/push_to_asf.py
----------------------------------------------------------------------
diff --git a/bin/push_to_asf.py b/bin/push_to_asf.py
index cbadad8..0b76a27 100755
--- a/bin/push_to_asf.py
+++ b/bin/push_to_asf.py
@@ -43,7 +43,6 @@ import subprocess
import sys
APACHE_REPO = "https://git-wip-us.apache.org/repos/asf/incubator-impala.git"
-GERRIT_URL_RE = re.compile(r"ssh://.+@gerrit.cloudera.org:29418/Impala")
# Parsed options, filled in by main().
OPTIONS = None
@@ -130,13 +129,14 @@ def check_gerrit_remote():
Otherwise, exits with an error message.
"""
try:
- url = check_output(\
- ['git', 'config', '--local', '--get', 'remote.gerrit.url']).strip()
+ url = check_output(['git', 'config', '--local', '--get',
+ 'remote.' + OPTIONS.remote + '.url']).strip()
except subprocess.CalledProcessError:
print >>sys.stderr, "No remote named 'gerrit'. Please set one up following "
print >>sys.stderr, "the contributor guide."
sys.exit(1)
- if not GERRIT_URL_RE.match(url):
+ gerrit_url_re = re.compile(OPTIONS.gerrit)
+ if not gerrit_url_re.match(url):
print >>sys.stderr, "Unexpected URL for remote 'gerrit'."
print >>sys.stderr, " Got: ", url
print >>sys.stderr, " Expected to find host '%s' in the URL" % GERRIT_HOST
@@ -262,6 +262,14 @@ def main():
"this script."))
p.add_option("-n", "--dry-run", action="store_true",
help="Perform git pushes with --dry-run")
+ p.add_option(
+ "-r",
+ "--remote",
+ dest="remote",
+ help="Name of the git remote that corresponds to gerrit",
+ default="asf-gerrit")
+ p.add_option("-g", "--gerrit", dest="gerrit", help="Gerrit URL regex",
+ default=r"ssh://.+@gerrit.cloudera.org:29418/ImpalaASF")
OPTIONS, args = p.parse_args()
if args:
p.error("no arguments expected")