comparison rhodecode/controllers/feed.py @ 1295:11548cc19c8f beta

fixes #183 decoding of paths in changes
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 27 Apr 2011 20:16:03 +0200
parents 50e41777675d
children 54fc83f2192c
comparison
equal deleted inserted replaced
1294:6f3411bd163d 1295:11548cc19c8f
26 import logging 26 import logging
27 27
28 from pylons import url, response, tmpl_context as c 28 from pylons import url, response, tmpl_context as c
29 from pylons.i18n.translation import _ 29 from pylons.i18n.translation import _
30 30
31 from rhodecode.lib import safe_unicode
31 from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator 32 from rhodecode.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator
32 from rhodecode.lib.base import BaseRepoController 33 from rhodecode.lib.base import BaseRepoController
33 34
34 from webhelpers.feedgenerator import Atom1Feed, Rss201rev2Feed 35 from webhelpers.feedgenerator import Atom1Feed, Rss201rev2Feed
35 36
51 self.feed_nr = 10 52 self.feed_nr = 10
52 53
53 def __changes(self, cs): 54 def __changes(self, cs):
54 changes = '' 55 changes = ''
55 56
56 a = [n.path for n in cs.added] 57 a = [safe_unicode(n.path) for n in cs.added]
57 if a: 58 if a:
58 changes += '\nA ' + '\nA '.join(a) 59 changes += '\nA ' + '\nA '.join(a)
59 60
60 m = [n.path for n in cs.changed] 61 m = [safe_unicode(n.path) for n in cs.changed]
61 if m: 62 if m:
62 changes += '\nM ' + '\nM '.join(m) 63 changes += '\nM ' + '\nM '.join(m)
63 64
64 d = [n.path for n in cs.removed] 65 d = [safe_unicode(n.path) for n in cs.removed]
65 if d: 66 if d:
66 changes += '\nD ' + '\nD '.join(d) 67 changes += '\nD ' + '\nD '.join(d)
67 68
68 changes += '</pre>' 69 changes += '</pre>'
69 70