Lines Matching full:repo
13 2. Skip updating a repo, e.g. autotest
15 3. Update a given repo to a specific commit
88 def clone_prod_branch(repo): argument
89 """Method to clone the prod branch for a given repo under /tmp/ dir.
91 @param repo: Name of the git repo to be cloned.
93 @returns path to the cloned repo.
97 repo_dir = '/tmp/%s' % repo
98 print 'Cloning %s prod branch under %s' % (repo, repo_dir)
101 git_repo = revision_control.GitRepo(repo_dir, GIT_URL[repo])
103 print 'Successfully cloned %s prod branch' % repo
107 def update_prod_branch(repo, repo_dir, hash_to_rebase): argument
108 """Method to update the prod branch of the given repo to the given hash.
110 @param repo: Name of the git repo to be updated.
111 @param repo_dir: path to the cloned repo.
120 print 'Updating %s prod branch.' % repo
133 print 'Successfully pushed %s prod branch!\n' % repo
141 'Fail to get pushed commits for repo %s from git log: %s' %
142 (repo, result))
145 print 'No new %s changes found since last push.' % repo
149 def get_pushed_commits(repo, repo_dir, pushed_commits_range): argument
152 @param repo: Name of the updated git repo.
153 @param repo_dir: path to the cloned repo.
161 print 'Getting pushed CLs for %s repo.' % repo
163 return '\n%s:\nNo new changes since last push.' % repo
170 if repo == 'autotest':
178 print 'Successfully got pushed CLs for %s repo!\n' % repo
180 if repo == 'autotest':
182 return '\n%s:\n%s\n%s\n' % (repo, displayed_cmd, pushed_commits)
188 @raises subprocess.CalledProcessError on a repo command failure.
213 # update_log saves the git log of the updated repo.
215 for repo, hash_to_rebase in repos.iteritems():
216 repo_dir = clone_prod_branch(repo)
218 repo, repo_dir, hash_to_rebase)
219 update_log += get_pushed_commits(repo, repo_dir, push_commits_range)
234 print ('Deploy succeeds!!! Below is the push log of the updated repo:\n%s'