[Libreoffice-commits] dev-tools.git: gerrit/auto-submit
Guilhem Moulin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 19 08:05:46 UTC 2020
gerrit/auto-submit/gerrit-autosubmit | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit ba70f3ba11b115793b96ccc27dbbec4a632a7122
Author: Guilhem Moulin <guilhem at libreoffice.org>
AuthorDate: Tue Feb 18 03:17:15 2020 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Feb 19 09:05:29 2020 +0100
gerrit-autosubmit: honor `gerrit.port` setting
Change-Id: Iddda4e3d4ceb39ad6c1f57b865509b98ff29e6af
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/88913
Tested-by: Miklos Vajna <vmiklos at collabora.com>
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/gerrit/auto-submit/gerrit-autosubmit b/gerrit/auto-submit/gerrit-autosubmit
index 2d40e23..ca231e5 100755
--- a/gerrit/auto-submit/gerrit-autosubmit
+++ b/gerrit/auto-submit/gerrit-autosubmit
@@ -18,11 +18,16 @@ def get_config(key):
return ret.decode("utf-8")
server = get_config("gerrit.host")
+port = get_config("gerrit.port")
project = get_config("gerrit.project")
branch = get_config("gerrit.defaultbranch")
+sshcommand = ["ssh"]
+if port != None and port != "":
+ sshcommand.extend(["-p", port])
+
while True:
- cmd = ["ssh", "-o", "ServerAliveInterval=5", server, "gerrit", "stream-events"]
+ cmd = sshcommand + ["-o", "ServerAliveInterval=5", server, "gerrit", "stream-events"]
sock = subprocess.Popen(cmd, stdout=subprocess.PIPE, bufsize=1)
try:
@@ -45,7 +50,7 @@ while True:
continue
rev = event['patchSet']['revision']
- cmd = ["ssh", server, "gerrit", "review", "-s", rev]
+ cmd = sshcommand + [server, "gerrit", "review", "-s", rev]
print(' '.join(cmd))
subprocess.call(cmd)
except KeyboardInterrupt:
More information about the Libreoffice-commits
mailing list