]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
repo_utils: allow checking out a specific commit
authorJosh Durgin <jdurgin@redhat.com>
Sun, 17 Jan 2021 02:04:08 +0000 (21:04 -0500)
committerJosh Durgin <jdurgin@redhat.com>
Tue, 19 Jan 2021 06:43:10 +0000 (01:43 -0500)
commit10c86d9c88cbf7ab4a6f7b81c1d4e823f36c6e68
treebc32de4b34916301c08a105f67e8cbbb759e328c
parent04fddc547fdde29fcb6e7eda98d23f0230f821d5
repo_utils: allow checking out a specific commit

Since we're cloning a particular branch with git clone --shallow,
assume we're still passed a branch that contains the commit. Otherwise
we'd waste time and space cloning all the branches in the repo.

Assume that this is only used for checking out a particular sha1 once,
to avoid repetitive work.

There are two use cases for these utilities:

1) on the user's machine when they're scheduling a suite - there it
will make sense to maintain a single checkout of a branch e.g. teuthology master

2) on the queue consumer side - here it's best if we use the same commit for an
entire run, so checking out by sha1 makes more sense

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
teuthology/repo_utils.py
teuthology/test/test_repo_utils.py