Changeset - 685ebc84c2e9
[Not reviewed]
beta
0 15 0
Marcin Kuzminski - 13 years ago 2012-11-26 20:14:40
marcin@python-works.com
White space cleanup
4 files changed with 3 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/feed.py
Show inline comments
 
@@ -159,25 +159,24 @@ class FeedController(BaseRepoController)
 
                         qualified=True),
 
                description=self.description % repo_name,
 
                language=self.language,
 
                ttl=self.ttl
 
            )
 

	
 
            for cs in reversed(list(c.rhodecode_repo[-self.feed_nr:])):
 
                feed.add_item(title=self._get_title(cs),
 
                              link=url('changeset_home', repo_name=repo_name,
 
                                       revision=cs.raw_id, qualified=True),
 
                              author_name=cs.author,
 
                              description=''.join(self.__get_desc(cs)),
 
                              pubdate=cs.date,
 
                             )
 

	
 
            response.content_type = feed.mime_type
 
            return feed.writeString('utf-8')
 

	
 
        key = repo_name + '_RSS'
 
        inv = CacheInvalidation.invalidate(key)
 
        if inv is not None:
 
            region_invalidate(_get_feed_from_cache, None, key)
 
            CacheInvalidation.set_valid(inv.cache_key)
 
        return _get_feed_from_cache(key)
 

	
rhodecode/lib/diffs.py
Show inline comments
 
@@ -744,25 +744,25 @@ def differ(org_repo, org_ref, other_repo
 
                org_repo.ui.setconfig('hooks', k, None)
 
            unbundle = org_repo.getbundle('incoming', common=None,
 
                                          heads=None)
 

	
 
            buf = BytesIO()
 
            while True:
 
                chunk = unbundle._stream.read(1024 * 4)
 
                if not chunk:
 
                    break
 
                buf.write(chunk)
 

	
 
            buf.seek(0)
 
            # replace chunked _stream with data that can do tell() and seek()
 
            unbundle._stream = buf
 

	
 
            ui = make_ui('db')
 
            bundlerepo = InMemoryBundleRepo(ui, path=org_repo.root,
 
                                            bundlestream=unbundle)
 

	
 
            return ''.join(patch.diff(bundlerepo,
 
                                      node1=other_repo[other_ref].node(),
 
                                      node2=org_repo[org_ref].node(),
 
                                      opts=opts))
 

	
 
    return ''
 
\ No newline at end of file
 
    return ''
rhodecode/lib/ext_json.py
Show inline comments
 
@@ -98,25 +98,25 @@ try:
 
    _json = imp.load_module('_json', *imp.find_module('json'))
 

	
 
    # extended JSON encoder for json
 
    class ExtendedEncoder(_json.JSONEncoder):
 
        def default(self, obj):
 
            try:
 
                return _obj_dump(obj)
 
            except NotImplementedError:
 
                pass
 
            raise TypeError("%r is not JSON serializable" % (obj,))
 
    # monkey-patch JSON encoder to use extended version
 
    _json.dumps = functools.partial(_json.dumps, cls=ExtendedEncoder)
 
    _json.dump = functools.partial(_json.dump, cls=ExtendedEncoder)
 

	
 
    stdlibjson = _json
 
except ImportError:
 
    stdlibjson = None
 

	
 
# set all available json modules
 
if simplejson:
 
    json = _sj
 
elif stdlibjson:
 
    json = _json
 
else:
 
    raise ImportError('Could not find any json modules')
 
\ No newline at end of file
 
    raise ImportError('Could not find any json modules')
rhodecode/templates/files/files_history_box.html
Show inline comments
 
<dl>
 
    <dt class="file_history">${_('History')}</dt>
 
    <dd>
 
        <div>
 
            <div style="float:left">
 
            ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')}
 
            ${h.hidden('diff2',c.file_changeset.raw_id)}
 
            ${h.select('diff1',c.file_changeset.raw_id,c.file_history)}
 
            ${h.submit('diff',_('diff to revision'),class_="ui-btn")}
 
            ${h.submit('show_rev',_('show at revision'),class_="ui-btn")}
 
            ${h.hidden('annotate', c.annotate)}
 
            ${h.end_form()}
 
            </div>
 
            <div class="file_author">
 
                <div class="item">${h.literal(ungettext(u'%s author',u'%s authors',len(c.authors)) % ('<b>%s</b>' % len(c.authors))) }</div>
 
                %for email, user in c.authors:
 
                  <div class="contributor tooltip" style="float:left" title="${h.tooltip(user)}">
 
                    <div class="gravatar" style="margin:1px"><img alt="gravatar" src="${h.gravatar_url(email, 20)}"/> </div>
 
                  </div>
 
                %endfor
 
            </div>
 
        </div>
 
        <div style="clear:both"></div>
 
    </dd>
 
</dl>
 
\ No newline at end of file
 
</dl>
0 comments (0 inline, 0 general)