Skip to content
This repository has been archived by the owner on Nov 13, 2019. It is now read-only.

Commit

Permalink
Fixed indent causing url update error
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Jones committed Jul 25, 2013
1 parent e6a271d commit 959675b
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions aosp_gerrit_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,29 @@ def main(argv=None):
url_update_list = rp
else:
url_update_list = np
print "Checking All Projects for gerrit remote"
for project in url_update_list:
#use repo forall with project name filter for relevant project
r = repo_forall(project[0], 'git', ['remote'])
remotes = r.splitlines()
if gerrit_git_remote_name in remotes:
print "Removing old gerrit remote for " +project[0]
r = repo_forall(project[0], 'git', ['remote','rm',gerrit_git_remote_name])

#TODO - only replace the remote if it isn't correct configured
print "Adding remote for " + project[0]
repo_url = ("ssh://"
+gerrit_ssh_user
+"@"
+gerrit_ssh_host
+":"
+str(gerrit_ssh_port)
+"/"
+aosp_branch_local_namespace
+"/"
+project[0])
print "new URL: " + repo_url
r = repo_forall(project[0], 'git', ['remote', 'add', gerrit_git_remote_name, repo_url])
print "Checking All Projects for gerrit remote"
for project in url_update_list:
#use repo forall with project name filter for relevant project
r = repo_forall(project[0], 'git', ['remote'])
remotes = r.splitlines()
if gerrit_git_remote_name in remotes:
print "Removing old gerrit remote for " +project[0]
r = repo_forall(project[0], 'git', ['remote','rm',gerrit_git_remote_name])

#TODO - only replace the remote if it isn't correct configured
print "Adding remote for " + project[0]
repo_url = ("ssh://"
+gerrit_ssh_user
+"@"
+gerrit_ssh_host
+":"
+str(gerrit_ssh_port)
+"/"
+aosp_branch_local_namespace
+"/"
+project[0])
print "new URL: " + repo_url
r = repo_forall(project[0], 'git', ['remote', 'add', gerrit_git_remote_name, repo_url])

#push each repo project to gerrit
#set the namespace'd branch mapping
Expand Down

0 comments on commit 959675b

Please sign in to comment.