Example #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
Example #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'])
Example #3
0
 def test_no_backend(self):
     with self.assertRaises(RuntimeError):
         load_repo(self.repo_path)
Example #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'])
Example #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))
Example #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))
Example #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))
Example #8
0
 def test_no_backend(self):
     with self.assertRaises(RuntimeError):
         load_repo(self.repo_path)
Example #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))
Example #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))
Example #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))