Changeset 376

Show
Ignore:
Timestamp:
01/19/06 22:44:20 (3 years ago)
Author:
athomas
Message:

RepoSearchPlugin:

  • If the index path is not set, use PYTHON_EGG_CACHE to store it.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • reposearchplugin/0.9/tracreposearch/indexer.py

    r375 r376  
    8282        self.repo = self.env.get_repository() 
    8383 
    84         if not self.env.config.get('repo-search', 'index'): 
     84        if not self.env.config.get('repo-search', 'index', 
     85                                   os.getenv('PYTHON_EGG_CACHE', None)): 
    8586            raise TracError("Repository search plugin indexer is not " \ 
    8687                            "configured correctly. Set the 'index' option " \ 
     
    8990 
    9091 
    91         self.index_dir = self.env.config.get('repo-search', 'index') 
    92         self.minimum_word_length = int(self.env.config.get('repo-search', 'minimum-word-length', 3)) 
     92        self.index_dir = self.env.config.get('repo-search', 'index', 
     93                         os.path.join(os.getenv('PYTHON_EGG_CACHE'), '.idx')) 
     94        self.env.log.debug('Repository search index: %s' % self.index_dir) 
     95        self.minimum_word_length = int(self.env.config.get('repo-search', 
     96                                       'minimum-word-length', 3)) 
    9397 
    9498        if not os.path.isdir(self.index_dir):