Пример #1
0
 def __init__(self, app, embedded_extensions=False):
     self.app = app
     self.embedded_extensions = embedded_extensions
     self.repo = load_repo(self.app.config['REPO_PATH'])
     self.changectx = None
     self.content = []
     app.blohg = self
Пример #2
0
 def repo(self):
     if not os.path.isdir(self.app.config['REPO_PATH']):
         raise RuntimeError('Repository not found: %s' % \
                            self.app.config['REPO_PATH'])
     return load_repo(self.app.config['REPO_PATH'])
Пример #3
0
 def test_no_backend(self):
     with self.assertRaises(RuntimeError):
         load_repo(self.repo_path)
Пример #4
0
 def repo(self):
     if not os.path.isdir(self.app.config['REPO_PATH']):
         raise RuntimeError('Repository not found: %s' % \
                            self.app.config['REPO_PATH'])
     return load_repo(self.app.config['REPO_PATH'])
Пример #5
0
 def test_load_git_repository(self):
     GitRepository.create_repo(self.repo_path)
     repo = load_repo(self.repo_path)
     self.assertTrue(isinstance(repo, GitRepository))
Пример #6
0
 def test_load_git_bare_repository(self):
     init_repository(self.repo_path, True)
     repo = load_repo(self.repo_path)
     self.assertTrue(isinstance(repo, GitRepository))
Пример #7
0
 def test_load_hg_repository(self):
     HgRepository.create_repo(self.repo_path)
     repo = load_repo(self.repo_path)
     self.assertTrue(isinstance(repo, HgRepository))
Пример #8
0
 def test_no_backend(self):
     with self.assertRaises(RuntimeError):
         load_repo(self.repo_path)
Пример #9
0
 def test_load_git_bare_repository(self):
     init_repository(self.repo_path, True)
     repo = load_repo(self.repo_path)
     self.assertTrue(isinstance(repo, GitRepository))
Пример #10
0
 def test_load_git_repository(self):
     GitRepository.create_repo(self.repo_path)
     repo = load_repo(self.repo_path)
     self.assertTrue(isinstance(repo, GitRepository))
Пример #11
0
 def test_load_hg_repository(self):
     HgRepository.create_repo(self.repo_path)
     repo = load_repo(self.repo_path)
     self.assertTrue(isinstance(repo, HgRepository))