Mercurial > kallithea
comparison rhodecode/lib/indexers/daemon.py @ 691:7486da5f0628 beta
Refactor codes for scm model
Some test updates, added test for admin user controller
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 14 Nov 2010 22:54:16 +0100 |
parents | 341beaa9edba |
children | 0dad296d2a57 |
comparison
equal
deleted
inserted
replaced
690:4685f3eafd35 | 691:7486da5f0628 |
---|---|
31 #to get the rhodecode import | 31 #to get the rhodecode import |
32 project_path = dn(dn(dn(dn(os.path.realpath(__file__))))) | 32 project_path = dn(dn(dn(dn(os.path.realpath(__file__))))) |
33 sys.path.append(project_path) | 33 sys.path.append(project_path) |
34 | 34 |
35 | 35 |
36 from rhodecode.model.hg import HgModel | 36 from rhodecode.model.scm import ScmModel |
37 from rhodecode.lib.helpers import safe_unicode | 37 from rhodecode.lib.helpers import safe_unicode |
38 from whoosh.index import create_in, open_dir | 38 from whoosh.index import create_in, open_dir |
39 from shutil import rmtree | 39 from shutil import rmtree |
40 from rhodecode.lib.indexers import INDEX_EXTENSIONS, SCHEMA, IDX_NAME | 40 from rhodecode.lib.indexers import INDEX_EXTENSIONS, SCHEMA, IDX_NAME |
41 | 41 |
76 | 76 |
77 self.repo_location = repo_location | 77 self.repo_location = repo_location |
78 if not repo_location: | 78 if not repo_location: |
79 raise Exception('You have to provide repositories location') | 79 raise Exception('You have to provide repositories location') |
80 | 80 |
81 self.repo_paths = HgModel().repo_scan(self.repo_location, None, True) | 81 self.repo_paths = ScmModel().repo_scan(self.repo_location, None, True) |
82 self.initial = False | 82 self.initial = False |
83 if not os.path.isdir(self.index_location): | 83 if not os.path.isdir(self.index_location): |
84 os.mkdir(self.index_location) | 84 os.mkdir(self.index_location) |
85 log.info('Cannot run incremental index since it does not' | 85 log.info('Cannot run incremental index since it does not' |
86 ' yet exist running full build') | 86 ' yet exist running full build') |