From 55b65d62f0ff07fdc23624953a7abf9ca46df87e Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Fri, 27 Jun 2014 10:21:53 -0600 Subject: [PATCH] Document checkout_repo() Signed-off-by: Zack Cerza --- teuthology/repo_utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/teuthology/repo_utils.py b/teuthology/repo_utils.py index f9b34b6947..1cebd695ff 100644 --- a/teuthology/repo_utils.py +++ b/teuthology/repo_utils.py @@ -8,6 +8,16 @@ log = logging.getLogger(__name__) def checkout_repo(repo_url, dest_path, branch): + """ + Use git to either clone or update a given repo, forcing it to switch to the + specified branch. + + :param repo_url: The full URL to the repo (not including the branch) + :param dest_path: The full path to the destination directory + :param branch: The branch. + :raises: BranchNotFoundError if the branch is not found; + RuntimeError for other errors + """ if not os.path.isdir(dest_path): log.info("Cloning %s %s from upstream", repo_url, branch) proc = subprocess.Popen( -- 2.39.5