Mercurial > kallithea
changeset 3921:932c84e8fa92 beta
fixed #851 and #563 make-index crashes on non-ascii files
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 30 May 2013 22:37:08 +0200 |
parents | 985db7f7b9b2 |
children | d8e02de53bbc |
files | rhodecode/lib/indexers/daemon.py |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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):