]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Document checkout_repo()
authorZack Cerza <zack@cerza.org>
Fri, 27 Jun 2014 16:21:53 +0000 (10:21 -0600)
committerZack Cerza <zack@cerza.org>
Fri, 27 Jun 2014 16:21:53 +0000 (10:21 -0600)
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/repo_utils.py

index f9b34b6947e1a99c63f07c2d0de17f5f9fa0afce..1cebd695ffa992ced4050ad17a49f1d57716fd19 100644 (file)
@@ -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(