##// END OF EJS Templates
updated whoosh indexer to take path as second argument
marcink -
r452:f19d3ee8 default
parent child Browse files
Show More
@@ -185,10 +185,12 b' class WhooshIndexingDaemon(object):'
185
185
186 if __name__ == "__main__":
186 if __name__ == "__main__":
187 arg = sys.argv[1:]
187 arg = sys.argv[1:]
188 if not arg:
188 if len(arg) != 2:
189 sys.stdout.write('Please specify indexing type [full|incremental]'
189 sys.stderr.write('Please specify indexing type [full|incremental]'
190 ' as script arg \n')
190 'and path to repositories as script args \n')
191 sys.exit()
191 sys.exit()
192
193
192 if arg[0] == 'full':
194 if arg[0] == 'full':
193 full_index = True
195 full_index = True
194 elif arg[0] == 'incremental':
196 elif arg[0] == 'incremental':
@@ -196,11 +198,17 b' if __name__ == "__main__":'
196 full_index = False
198 full_index = False
197 else:
199 else:
198 sys.stdout.write('Please use [full|incremental]'
200 sys.stdout.write('Please use [full|incremental]'
199 ' as script arg \n')
201 ' as script first arg \n')
200 sys.exit()
202 sys.exit()
201
203
202
204 if not os.path.isdir(arg[1]):
203 repo_location = '/home/hg_repos/*'
205 sys.stderr.write('%s is not a valid path \n' % arg[1])
206 sys.exit()
207 else:
208 if arg[1].endswith('/'):
209 repo_location = arg[1] + '*'
210 else:
211 repo_location = arg[1] + '/*'
204
212
205 try:
213 try:
206 l = DaemonLock()
214 l = DaemonLock()
General Comments 0
You need to be logged in to leave comments. Login now