Commit 0418e79b authored by Michal Čihař's avatar Michal Čihař

Improve handling of repository cache

parent a37e0a50
......@@ -54,20 +54,28 @@ class RepoTestCase(TestCase):
'test-repo.git'
)
# Git command wrapper
cmd = git.Git()
# Clone repo for testing
if not os.path.exists(self.base_repo_path):
cmd = git.Git()
cmd.clone(
'--bare',
'git://github.com/nijel/weblate-test.git',
self.base_repo_path
)
# Create separate testing copy (so that we can push to it)
# Remove possibly existing directory
if os.path.exists(self.repo_path):
shutil.rmtree(self.repo_path)
shutil.copytree(self.base_repo_path, self.repo_path)
# Clone copy for the test
cmd.clone(
'--bare',
'--reference', self.base_repo_path,
'git://github.com/nijel/weblate-test.git',
self.repo_path
)
def create_project(self):
'''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment