Mercurial > kallithea
changeset 5594:87aef0cb5a6a
Merge stable
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 27 Nov 2015 01:39:21 +0100 |
parents | 007d1a34a35a (current diff) 1666c8c7d925 (diff) |
children | 6c7efed20abc |
files | docs/setup.rst kallithea/controllers/admin/gists.py kallithea/templates/admin/gists/edit.html |
diffstat | 6 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/docs/setup.rst Tue Nov 17 02:42:07 2015 +0100 +++ b/docs/setup.rst Fri Nov 27 01:39:21 2015 +0100 @@ -730,7 +730,7 @@ WSGIDaemonProcess kallithea \ processes=1 threads=4 \ - python-path=/srv/kallithea/pyenv/lib/python2.7/site-packages + python-path=/srv/kallithea/venv/lib/python2.7/site-packages WSGIScriptAlias / /srv/kallithea/dispatch.wsgi WSGIPassAuthorization On @@ -758,7 +758,7 @@ os.chdir('/srv/kallithea/') import site - site.addsitedir("/srv/kallithea/pyenv/lib/python2.7/site-packages") + site.addsitedir("/srv/kallithea/venv/lib/python2.7/site-packages") from paste.deploy import loadapp from paste.script.util.logging_config import fileConfig
--- a/kallithea/controllers/admin/gists.py Tue Nov 17 02:42:07 2015 +0100 +++ b/kallithea/controllers/admin/gists.py Fri Nov 27 01:39:21 2015 +0100 @@ -42,7 +42,7 @@ from kallithea.lib.base import BaseController, render from kallithea.lib.auth import LoginRequired, NotAnonymous from kallithea.lib.utils import jsonify -from kallithea.lib.utils2 import safe_int, time_to_datetime +from kallithea.lib.utils2 import safe_int, safe_unicode, time_to_datetime from kallithea.lib.helpers import Page from sqlalchemy.sql.expression import or_ from kallithea.lib.vcs.exceptions import VCSError, NodeNotChangedError @@ -205,7 +205,7 @@ log.error(traceback.format_exc()) raise HTTPNotFound() if format == 'raw': - content = '\n\n'.join([f.content for f in c.files if (f_path is None or f.path == f_path)]) + content = '\n\n'.join([f.content for f in c.files if (f_path is None or safe_unicode(f.path) == f_path)]) response.content_type = 'text/plain' return content return render('admin/gists/show.html')
--- a/kallithea/lib/paster_commands/repo_scan.py Tue Nov 17 02:42:07 2015 +0100 +++ b/kallithea/lib/paster_commands/repo_scan.py Fri Nov 27 01:39:21 2015 +0100 @@ -56,12 +56,12 @@ #get SqlAlchemy session self._init_session() rm_obsolete = self.options.delete_obsolete - log.info('Now scanning root location for new repos...') + print 'Now scanning root location for new repos ...' added, removed = repo2db_mapper(ScmModel().repo_scan(), remove_obsolete=rm_obsolete) added = ', '.join(added) or '-' removed = ', '.join(removed) or '-' - log.info('Scan completed added: %s removed: %s', added, removed) + print 'Scan completed added: %s removed: %s' % (added, removed) def update_parser(self): self.parser.add_option(
--- a/kallithea/templates/admin/gists/edit.html Tue Nov 17 02:42:07 2015 +0100 +++ b/kallithea/templates/admin/gists/edit.html Fri Nov 27 01:39:21 2015 +0100 @@ -69,8 +69,8 @@ % for cnt, file in enumerate(c.files): <div id="body" class="codeblock" style="margin-bottom: 4px"> <div style="padding: 10px 10px 10px 26px;color:#666666"> - <input type="hidden" value="${file.path}" name="org_files"> - <input id="filename_${h.FID('f',file.path)}" name="files" size="30" type="text" value="${file.path}"> + <input type="hidden" value="${h.safe_unicode(file.path)}" name="org_files"> + <input id="filename_${h.FID('f',file.path)}" name="files" size="30" type="text" value="${h.safe_unicode(file.path)}"> <select id="mimetype_${h.FID('f',file.path)}" name="mimetypes"/> </div> <div class="editor_container">
--- a/kallithea/templates/admin/gists/show.html Tue Nov 17 02:42:07 2015 +0100 +++ b/kallithea/templates/admin/gists/show.html Fri Nov 27 01:39:21 2015 +0100 @@ -81,9 +81,9 @@ <div style="border: 1px solid #EEE;margin-top:20px"> <div id="${h.FID('G', file.path)}" class="stats" style="border-bottom: 1px solid #DDD;padding: 8px 14px;"> <a href="${c.gist.gist_url()}">ΒΆ</a> - <b style="margin:0px 0px 0px 4px">${file.path}</b> + <b style="margin:0px 0px 0px 4px">${h.safe_unicode(file.path)}</b> <div style="float:right; margin: -5px"> - ${h.link_to(_('Show as raw'),h.url('formatted_gist_file', gist_id=c.gist.gist_access_id, format='raw', revision=file.changeset.raw_id, f_path=file.path),class_="btn btn-mini")} + ${h.link_to(_('Show as raw'),h.url('formatted_gist_file', gist_id=c.gist.gist_access_id, format='raw', revision=file.changeset.raw_id, f_path=h.safe_unicode(file.path)),class_="btn btn-mini")} </div> </div> <div class="code-body">