Show More
@@ -52,23 +52,23 b' class FeedController(BaseRepoController)' | |||
|
52 | 52 | self.feed_nr = 10 |
|
53 | 53 | |
|
54 | 54 | def __changes(self, cs): |
|
55 |
changes = |
|
|
55 | changes = [] | |
|
56 | 56 | |
|
57 | 57 | a = [safe_unicode(n.path) for n in cs.added] |
|
58 | 58 | if a: |
|
59 |
changes |
|
|
59 | changes.append('\nA ' + '\nA '.join(a)) | |
|
60 | 60 | |
|
61 | 61 | m = [safe_unicode(n.path) for n in cs.changed] |
|
62 | 62 | if m: |
|
63 |
changes |
|
|
63 | changes.append('\nM ' + '\nM '.join(m)) | |
|
64 | 64 | |
|
65 | 65 | d = [safe_unicode(n.path) for n in cs.removed] |
|
66 | 66 | if d: |
|
67 |
changes |
|
|
67 | changes.append('\nD ' + '\nD '.join(d)) | |
|
68 | 68 | |
|
69 |
changes |
|
|
69 | changes.append('</pre>') | |
|
70 | 70 | |
|
71 | return changes | |
|
71 | return ''.join(changes) | |
|
72 | 72 | |
|
73 | 73 | def atom(self, repo_name): |
|
74 | 74 | """Produce an atom-1.0 feed via feedgenerator module""" |
@@ -78,16 +78,16 b' class FeedController(BaseRepoController)' | |||
|
78 | 78 | description=self.description % repo_name, |
|
79 | 79 | language=self.language, |
|
80 | 80 | ttl=self.ttl) |
|
81 | ||
|
81 | desc_msg = [] | |
|
82 | 82 | for cs in reversed(list(c.rhodecode_repo[-self.feed_nr:])): |
|
83 |
desc |
|
|
84 |
desc |
|
|
83 | desc_msg.append('%s - %s<br/><pre>' % (cs.author, cs.date)) | |
|
84 | desc_msg.append(self.__changes(cs)) | |
|
85 | 85 | |
|
86 | 86 | feed.add_item(title=cs.message, |
|
87 | 87 | link=url('changeset_home', repo_name=repo_name, |
|
88 | 88 | revision=cs.raw_id, qualified=True), |
|
89 | 89 | author_name=cs.author, |
|
90 | description=desc) | |
|
90 | description=''.join(desc_msg)) | |
|
91 | 91 | |
|
92 | 92 | response.content_type = feed.mime_type |
|
93 | 93 | return feed.writeString('utf-8') |
@@ -100,16 +100,16 b' class FeedController(BaseRepoController)' | |||
|
100 | 100 | description=self.description % repo_name, |
|
101 | 101 | language=self.language, |
|
102 | 102 | ttl=self.ttl) |
|
103 | ||
|
103 | desc_msg = [] | |
|
104 | 104 | for cs in reversed(list(c.rhodecode_repo[-self.feed_nr:])): |
|
105 |
desc |
|
|
106 |
desc |
|
|
105 | desc_msg.append('%s - %s<br/><pre>' % (cs.author, cs.date)) | |
|
106 | desc_msg.append(self.__changes(cs)) | |
|
107 | 107 | |
|
108 | 108 | feed.add_item(title=cs.message, |
|
109 | 109 | link=url('changeset_home', repo_name=repo_name, |
|
110 | 110 | revision=cs.raw_id, qualified=True), |
|
111 | 111 | author_name=cs.author, |
|
112 | description=desc, | |
|
112 | description=''.join(desc_msg), | |
|
113 | 113 | ) |
|
114 | 114 | |
|
115 | 115 | response.content_type = feed.mime_type |
@@ -376,12 +376,12 b' def action_parser(user_log, feed=False):' | |||
|
376 | 376 | invalidation_list=[]) |
|
377 | 377 | |
|
378 | 378 | message = lambda rev: get_changeset_safe(repo, rev).message |
|
379 | ||
|
380 |
cs_links |
|
|
379 | cs_links = [] | |
|
380 | cs_links.append(" " + ', '.join ([link_to(rev, | |
|
381 | 381 | url('changeset_home', |
|
382 | 382 | repo_name=repo_name, |
|
383 | 383 | revision=rev), title=tooltip(message(rev)), |
|
384 | class_='tooltip') for rev in revs[:revs_limit] ]) | |
|
384 | class_='tooltip') for rev in revs[:revs_limit] ])) | |
|
385 | 385 | |
|
386 | 386 | compare_view = (' <div class="compare_view tooltip" title="%s">' |
|
387 | 387 | '<a href="%s">%s</a> ' |
@@ -399,23 +399,23 b' def action_parser(user_log, feed=False):' | |||
|
399 | 399 | '<a class="show_more" id="_%s" href="#more">%s</a> ' |
|
400 | 400 | '%s</span>') |
|
401 | 401 | if not feed: |
|
402 |
cs_links |
|
|
402 | cs_links.append(html_tmpl % (_('and'), uniq_id, _('%s more') \ | |
|
403 | 403 | % (len(revs) - revs_limit), |
|
404 | _('revisions')) | |
|
404 | _('revisions'))) | |
|
405 | 405 | |
|
406 | 406 | if not feed: |
|
407 | 407 | html_tmpl = '<span id="%s" style="display:none"> %s </span>' |
|
408 | 408 | else: |
|
409 | 409 | html_tmpl = '<span id="%s"> %s </span>' |
|
410 | 410 | |
|
411 |
cs_links |
|
|
411 | cs_links.append(html_tmpl % (uniq_id, ', '.join([link_to(rev, | |
|
412 | 412 | url('changeset_home', |
|
413 | 413 | repo_name=repo_name, revision=rev), |
|
414 | 414 | title=message(rev), class_='tooltip') |
|
415 | for rev in revs[revs_limit:revs_top_limit]])) | |
|
415 | for rev in revs[revs_limit:revs_top_limit]]))) | |
|
416 | 416 | if len(revs) > 1: |
|
417 |
cs_links |
|
|
418 | return cs_links | |
|
417 | cs_links.append(compare_view) | |
|
418 | return ''.join(cs_links) | |
|
419 | 419 | |
|
420 | 420 | def get_fork_name(): |
|
421 | 421 | repo_name = action_params |
General Comments 0
You need to be logged in to leave comments.
Login now