##// END OF EJS Templates
fixed some unicode problems with git file path
marcink -
r3792:63adb3d5 beta
parent child Browse files
Show More
@@ -17,7 +17,7 b' from rhodecode.lib.vcs.nodes import File'
17 from rhodecode.lib.vcs.utils import safe_unicode
17 from rhodecode.lib.vcs.utils import safe_unicode
18 from rhodecode.lib.vcs.utils import date_fromtimestamp
18 from rhodecode.lib.vcs.utils import date_fromtimestamp
19 from rhodecode.lib.vcs.utils.lazy import LazyProperty
19 from rhodecode.lib.vcs.utils.lazy import LazyProperty
20 from rhodecode.lib.utils2 import safe_int
20 from rhodecode.lib.utils2 import safe_int, safe_str
21
21
22
22
23 class GitChangeset(BaseChangeset):
23 class GitChangeset(BaseChangeset):
@@ -289,15 +289,18 b' class GitChangeset(BaseChangeset):'
289 which is generally not good. Should be replaced with algorithm
289 which is generally not good. Should be replaced with algorithm
290 iterating commits.
290 iterating commits.
291 """
291 """
292 self._get_filectx(path)
293 cs_id = safe_str(self.id)
294 f_path = safe_str(path)
292
295
293 self._get_filectx(path)
294 if limit:
296 if limit:
295 cmd = 'log -n %s --pretty="format: %%H" -s -p %s -- "%s"' % (
297 cmd = 'log -n %s --pretty="format: %%H" -s -p %s -- "%s"' % (
296 safe_int(limit, 0), self.id, path
298 safe_int(limit, 0), cs_id, f_path
297 )
299 )
300
298 else:
301 else:
299 cmd = 'log --pretty="format: %%H" -s -p %s -- "%s"' % (
302 cmd = 'log --pretty="format: %%H" -s -p %s -- "%s"' % (
300 self.id, path
303 cs_id, f_path
301 )
304 )
302 so, se = self.repository.run_git_command(cmd)
305 so, se = self.repository.run_git_command(cmd)
303 ids = re.findall(r'[0-9a-fA-F]{40}', so)
306 ids = re.findall(r'[0-9a-fA-F]{40}', so)
@@ -3,7 +3,7 b''
3 <%def name="title(*args)">
3 <%def name="title(*args)">
4 ${_('%s Files') % c.repo_name}
4 ${_('%s Files') % c.repo_name}
5 %if hasattr(c,'file'):
5 %if hasattr(c,'file'):
6 &middot; ${c.file.path or '\\'}
6 &middot; ${h.safe_unicode(c.file.path) or '\\'}
7 %endif
7 %endif
8 &middot; ${c.rhodecode_name}
8 &middot; ${c.rhodecode_name}
9 </%def>
9 </%def>
General Comments 0
You need to be logged in to leave comments. Login now