Lines Matching full:repo
35 def CreateBranch(repo, branch): argument
36 """Creates a branch in the given repo.
39 repo: The absolute path to the repo.
43 ValueError: Failed to create a repo in that directory.
46 if not os.path.isdir(repo):
47 raise ValueError("Invalid directory path provided: %s" % repo)
49 subprocess.check_output(["git", "-C", repo, "reset", "HEAD", "--hard"])
51 subprocess.check_output(["repo", "start", branch], cwd=repo)
54 def DeleteBranch(repo, branch): argument
55 """Deletes a branch in the given repo.
58 repo: The absolute path of the repo.
62 ValueError: Failed to delete the repo in that directory.
65 if not os.path.isdir(repo):
66 raise ValueError("Invalid directory path provided: %s" % repo)
68 subprocess.check_output(["git", "-C", repo, "checkout", "cros/main"])
70 subprocess.check_output(["git", "-C", repo, "reset", "HEAD", "--hard"])
72 subprocess.check_output(["git", "-C", repo, "branch", "-D", branch])
75 def UploadChanges(repo, branch, commit_messages, reviewers=None, cc=None): argument
76 """Uploads the changes in the specifed branch of the given repo for review.
79 repo: The absolute path to the repo where changes were made.
95 if not os.path.isdir(repo):
96 raise ValueError("Invalid path provided: %s" % repo)
103 subprocess.check_output(["git", "commit", "-F", f.name], cwd=repo)
107 "repo",
121 cwd=repo,