Lines Matching full:repo
25 def CreateBranch(repo: Union[Path, str], branch: str) -> None:
26 """Creates a branch in the given repo.
29 repo: The absolute path to the repo.
33 ValueError: Failed to create a repo in that directory.
36 if not os.path.isdir(repo):
37 raise ValueError("Invalid directory path provided: %s" % repo)
39 subprocess.check_output(["git", "-C", repo, "reset", "HEAD", "--hard"])
41 subprocess.check_output(["repo", "start", branch], cwd=repo)
44 def DeleteBranch(repo: Union[Path, str], branch: str) -> None:
45 """Deletes a branch in the given repo.
48 repo: The absolute path of the repo.
52 ValueError: Failed to delete the repo in that directory.
55 if not os.path.isdir(repo):
56 raise ValueError("Invalid directory path provided: %s" % repo)
59 subprocess.run(["git", "-C", repo] + cmd, check=True)
67 repo: Union[Path, str], commit_messages: Iterable[str]
72 repo: The absolute path to the repo where changes were made.
75 if not os.path.isdir(repo):
76 raise ValueError("Invalid path provided: %s" % repo)
83 subprocess.check_output(["git", "commit", "-F", f.name], cwd=repo)
87 repo: Union[Path, str],
93 """Uploads the changes in the specifed branch of the given repo for review.
96 repo: The absolute path to the repo where changes were made.
111 if not os.path.isdir(repo):
112 raise ValueError("Invalid path provided: %s" % repo)
116 "repo",
132 cwd=repo,