Changeset - 932c84e8fa92
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 12 years ago 2013-05-30 22:37:08
marcin@python-works.com
fixed #851 and #563 make-index crashes on non-ascii files
1 file changed with 11 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/indexers/daemon.py
Show inline comments
 
@@ -137,15 +137,24 @@ class WhooshIndexingDaemon(object):
 
        except RepositoryError:
 
            log.debug(traceback.format_exc())
 
            pass
 
        return index_paths_
 

	
 
    def get_node(self, repo, path):
 
        n_path = path[len(repo.path) + 1:]
 
        """
 
        gets a filenode based on given full path.It operates on string for
 
        hg git compatability.
 

	
 
        :param repo: scm repo instance
 
        :param path: full path including root location
 
        :return: FileNode
 
        """
 
        root_path = safe_str(repo.path)+'/'
 
        parts = safe_str(path).partition(root_path)
 
        cs = self._get_index_changeset(repo)
 
        node = cs.get_node(n_path)
 
        node = cs.get_node(parts[-1])
 
        return node
 

	
 
    def get_node_mtime(self, node):
 
        return mktime(node.last_changeset.date.timetuple())
 

	
 
    def add_doc(self, writer, path, repo, repo_name):
0 comments (0 inline, 0 general)