• Home
  • Raw
  • Download

Lines Matching full:repo

13   2. Skip updating a repo, e.g. autotest
15 3. Update a given repo to a specific commit
74 def clone_prod_branch(repo): argument
75 """Method to clone the prod branch for a given repo under /tmp/ dir.
77 @param repo: Name of the git repo to be cloned.
79 @returns path to the cloned repo.
83 repo_dir = '/tmp/%s' % repo
84 print 'Cloning %s prod branch under %s' % (repo, repo_dir)
87 git_repo = revision_control.GitRepo(repo_dir, GIT_URL[repo])
89 print 'Successfully cloned %s prod branch' % repo
93 def update_prod_branch(repo, repo_dir, hash_to_rebase): argument
94 """Method to update the prod branch of the given repo to the given hash.
96 @param repo: Name of the git repo to be updated.
97 @param repo_dir: path to the cloned repo.
106 print 'Updating %s prod branch.' % repo
119 print 'Successfully pushed %s prod branch!\n' % repo
127 'Fail to get pushed commits for repo %s from git log: %s' %
128 (repo, result))
131 print 'No new %s changes found since last push.' % repo
135 def get_pushed_commits(repo, repo_dir, pushed_commits_range): argument
138 @param repo: Name of the updated git repo.
139 @param repo_dir: path to the cloned repo.
147 print 'Getting pushed CLs for %s repo.' % repo
149 return '\n%s:\nNo new changes since last push.' % repo
156 if repo == 'autotest':
164 print 'Successfully got pushed CLs for %s repo!\n' % repo
165 return '\n%s:\n%s\n%s\n' % (repo, get_commits_cmd, pushed_commits)
171 @raises subprocess.CalledProcessError on a repo command failure.
192 # update_log saves the git log of the updated repo.
194 for repo, hash_to_rebase in repos.iteritems():
195 repo_dir = clone_prod_branch(repo)
197 repo, repo_dir, hash_to_rebase)
198 update_log += get_pushed_commits(repo, repo_dir, push_commits_range)
213 print ('Deploy succeeds!!! Below is the push log of the updated repo:\n%s'