aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelley Spoon <kelley.spoon@linaro.org>2019-02-20 01:19:08 -0600
committerKelley Spoon <kelley.spoon@linaro.org>2019-02-20 01:19:08 -0600
commit4b4557dfe225a8f4e3cb49d28818700094df51da (patch)
tree3a6a31847056e1adc47ccd06e411015dfc56ccd1
parent9e4a84aa6100a139cfccdf4321e341b45f8791be (diff)
git-gerrit-mirror: add --all to gerrit ls-projects
In gerrit 2.16 there was a slight behavior change in the gerrit 'ls-projects' command in that it does not appear to recurse through parent projects to list children unless you explicitly request it with the '--all' object. This was causing our git-gerrit-mirror script to attempt to recreate multiple projects that already existed. Change-Id: I5e66a860e72303580e9ad577a24831ab2beb6c46
-rwxr-xr-xgit-gerrit-mirror3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-gerrit-mirror b/git-gerrit-mirror
index 8daba5e..ed0c7f8 100755
--- a/git-gerrit-mirror
+++ b/git-gerrit-mirror
@@ -174,7 +174,7 @@ def get_gerrit_projects(gerrit_host):
if len(parts) == 1:
parts.append("29418")
ssh_identity_option = get_ssh_identity_file_option()
- cmd = "ssh %s -p %s %s gerrit ls-projects" % (
+ cmd = "ssh %s -p %s %s gerrit ls-projects --all" % (
ssh_identity_option, parts[1], parts[0])
log.debug("Running command: %s", cmd)
return [x.strip() for x in
@@ -198,6 +198,7 @@ def get_ssh_identity_file_option():
return ssh_identity_option
+#HERE
def get_project_map_for_a_host(host):
"""Get {src: dest} project map for a host. These can be either:
1. Manually specified projects (with destination remaps or no)