Changeset - 8d78d79b67a3
[Not reviewed]
default
0 1 0
Marcin Kuzminski - 15 years ago 2010-10-20 17:57:55
marcin@python-works.com
fixed bug when whoosh failed indexing an new repository.
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/indexers/daemon.py
Show inline comments
 
@@ -77,26 +77,27 @@ class WhooshIndexingDaemon(object):
 
        if not os.path.isdir(IDX_LOCATION):
 
            os.mkdir(IDX_LOCATION)
 
            log.info('Cannot run incremental index since it does not'
 
                     ' yet exist running full build')
 
            self.initial = True
 
        
 
    def get_paths(self, repo):
 
        """
 
        recursive walk in root dir and return a set of all path in that dir
 
        based on repository walk function
 
        """
 
        index_paths_ = set()
 
        tip = repo.get_changeset()
 
        try:
 
            tip = repo.get_changeset()
 
            
 
            for topnode, dirs, files in tip.walk('/'):
 
                for f in files:
 
                    index_paths_.add(jn(repo.path, f.path))
 
                for dir in dirs:
 
                    for f in files:
 
                        index_paths_.add(jn(repo.path, f.path))
 
                
 
        except RepositoryError:
 
            pass
 
        return index_paths_        
 
    
 
    def get_node(self, repo, path):
0 comments (0 inline, 0 general)