diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-05-03 11:23:56 +0100 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-05-04 14:24:07 +0100 |
commit | 66327f8eb3cec93b53a3dcc948369ba48c9ad50a (patch) | |
tree | 1ed39c3f8269c3a06b4438ce9f65e37172c05ce1 /morphlib/cachedrepo.py | |
parent | 73e46e9e284c88ddd9e984844f02ab98d635d8a9 (diff) | |
download | morph-66327f8eb3cec93b53a3dcc948369ba48c9ad50a.tar.gz |
Relax CachedRepo.checkout requirement that ref is a sha1
Diffstat (limited to 'morphlib/cachedrepo.py')
-rw-r--r-- | morphlib/cachedrepo.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/morphlib/cachedrepo.py b/morphlib/cachedrepo.py index 5dc7e55d..0f348196 100644 --- a/morphlib/cachedrepo.py +++ b/morphlib/cachedrepo.py @@ -135,10 +135,9 @@ class CachedRepo(object): (filename, ref, self)) def checkout(self, ref, target_dir): - '''Unpacks the repository in a directory and checks out a SHA1 ref. + '''Unpacks the repository in a directory and checks out a commit ref. - Raises an UnresolvedNamedReferenceError if the specified ref is not - a SHA1 ref. Raises a CheckoutDirectoryExistsError if the target + Raises a CheckoutDirectoryExistsError if the target directory already exists. Raises an InvalidReferenceError if the ref is not found in the repository. Raises a CheckoutError if something else goes wrong while copying the repository or checking @@ -146,9 +145,6 @@ class CachedRepo(object): ''' - if not self.is_valid_sha1(ref): - raise UnresolvedNamedReferenceError(self, ref) - if os.path.exists(target_dir): raise CheckoutDirectoryExistsError(self, target_dir) |