##// 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 186 if __name__ == "__main__":
187 187 arg = sys.argv[1:]
188 if not arg:
189 sys.stdout.write('Please specify indexing type [full|incremental]'
190 ' as script arg \n')
188 if len(arg) != 2:
189 sys.stderr.write('Please specify indexing type [full|incremental]'
190 'and path to repositories as script args \n')
191 191 sys.exit()
192
193
192 194 if arg[0] == 'full':
193 195 full_index = True
194 196 elif arg[0] == 'incremental':
@@ -196,11 +198,17 b' if __name__ == "__main__":'
196 198 full_index = False
197 199 else:
198 200 sys.stdout.write('Please use [full|incremental]'
199 ' as script arg \n')
201 ' as script first arg \n')
200 202 sys.exit()
201 203
202
203 repo_location = '/home/hg_repos/*'
204 if not os.path.isdir(arg[1]):
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 213 try:
206 214 l = DaemonLock()
General Comments 0
You need to be logged in to leave comments. Login now