# HG changeset patch # User Marcin Kuzminski # Date 1366978486 -7200 # Node ID 5135f14b316e4c0062c21fd2459eee7f436a190b # Parent e3857cbb6d1027a59fe815e6cae21dce682cf992 fixed some unicode problems with git file path diff -r e3857cbb6d10 -r 5135f14b316e rhodecode/lib/vcs/backends/git/changeset.py --- a/rhodecode/lib/vcs/backends/git/changeset.py Tue Apr 09 15:39:45 2013 +0200 +++ b/rhodecode/lib/vcs/backends/git/changeset.py Fri Apr 26 14:14:46 2013 +0200 @@ -17,7 +17,7 @@ from rhodecode.lib.vcs.utils import safe_unicode from rhodecode.lib.vcs.utils import date_fromtimestamp from rhodecode.lib.vcs.utils.lazy import LazyProperty -from rhodecode.lib.utils2 import safe_int +from rhodecode.lib.utils2 import safe_int, safe_str class GitChangeset(BaseChangeset): @@ -289,15 +289,18 @@ which is generally not good. Should be replaced with algorithm iterating commits. """ + self._get_filectx(path) + cs_id = safe_str(self.id) + f_path = safe_str(path) - self._get_filectx(path) if limit: cmd = 'log -n %s --pretty="format: %%H" -s -p %s -- "%s"' % ( - safe_int(limit, 0), self.id, path + safe_int(limit, 0), cs_id, f_path ) + else: cmd = 'log --pretty="format: %%H" -s -p %s -- "%s"' % ( - self.id, path + cs_id, f_path ) so, se = self.repository.run_git_command(cmd) ids = re.findall(r'[0-9a-fA-F]{40}', so) diff -r e3857cbb6d10 -r 5135f14b316e rhodecode/templates/files/files.html --- a/rhodecode/templates/files/files.html Tue Apr 09 15:39:45 2013 +0200 +++ b/rhodecode/templates/files/files.html Fri Apr 26 14:14:46 2013 +0200 @@ -3,7 +3,7 @@ <%def name="title(*args)"> ${_('%s Files') % c.repo_name} %if hasattr(c,'file'): - · ${c.file.path or '\\'} + · ${h.safe_unicode(c.file.path) or '\\'} %endif · ${c.rhodecode_name}