# HG changeset patch # User Marcin Kuzminski # Date 1369946228 -7200 # Node ID 932c84e8fa92a74193b43a63e77305767ad9f607 # Parent 985db7f7b9b25388c4b4056d7001e1bc2d2322d7 fixed #851 and #563 make-index crashes on non-ascii files diff -r 985db7f7b9b2 -r 932c84e8fa92 rhodecode/lib/indexers/daemon.py --- a/rhodecode/lib/indexers/daemon.py Thu May 30 16:08:14 2013 +0200 +++ b/rhodecode/lib/indexers/daemon.py Thu May 30 22:37:08 2013 +0200 @@ -140,9 +140,18 @@ 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):