Show More
@@ -56,6 +56,12 b' class WhooshIndexingDaemon(object):' | |||||
56 | def __init__(self, indexname='HG_INDEX', repo_location=None): |
|
56 | def __init__(self, indexname='HG_INDEX', repo_location=None): | |
57 | self.indexname = indexname |
|
57 | self.indexname = indexname | |
58 | self.repo_location = repo_location |
|
58 | self.repo_location = repo_location | |
|
59 | self.initial = False | |||
|
60 | if not os.path.isdir(IDX_LOCATION): | |||
|
61 | os.mkdir(IDX_LOCATION) | |||
|
62 | log.info('Cannot run incremental index since it does not' | |||
|
63 | ' yet exist running full build') | |||
|
64 | self.initial = True | |||
59 |
|
65 | |||
60 | def get_paths(self, root_dir): |
|
66 | def get_paths(self, root_dir): | |
61 | """recursive walk in root dir and return a set of all path in that dir |
|
67 | """recursive walk in root dir and return a set of all path in that dir | |
@@ -178,7 +184,7 b' class WhooshIndexingDaemon(object):' | |||||
178 |
|
184 | |||
179 | def run(self, full_index=False): |
|
185 | def run(self, full_index=False): | |
180 | """Run daemon""" |
|
186 | """Run daemon""" | |
181 | if full_index: |
|
187 | if full_index or self.initial: | |
182 | self.build_index() |
|
188 | self.build_index() | |
183 | else: |
|
189 | else: | |
184 | self.update_index() |
|
190 | self.update_index() |
General Comments 0
You need to be logged in to leave comments.
Login now