Show More
@@ -730,7 +730,7 b' Here is a sample excerpt from an Apache ' | |||||
730 |
|
730 | |||
731 | WSGIDaemonProcess kallithea \ |
|
731 | WSGIDaemonProcess kallithea \ | |
732 | processes=1 threads=4 \ |
|
732 | processes=1 threads=4 \ | |
733 |
python-path=/srv/kallithea/ |
|
733 | python-path=/srv/kallithea/venv/lib/python2.7/site-packages | |
734 | WSGIScriptAlias / /srv/kallithea/dispatch.wsgi |
|
734 | WSGIScriptAlias / /srv/kallithea/dispatch.wsgi | |
735 | WSGIPassAuthorization On |
|
735 | WSGIPassAuthorization On | |
736 |
|
736 | |||
@@ -758,7 +758,7 b' Example WSGI dispatch script:' | |||||
758 | os.chdir('/srv/kallithea/') |
|
758 | os.chdir('/srv/kallithea/') | |
759 |
|
759 | |||
760 | import site |
|
760 | import site | |
761 |
site.addsitedir("/srv/kallithea/ |
|
761 | site.addsitedir("/srv/kallithea/venv/lib/python2.7/site-packages") | |
762 |
|
762 | |||
763 | from paste.deploy import loadapp |
|
763 | from paste.deploy import loadapp | |
764 | from paste.script.util.logging_config import fileConfig |
|
764 | from paste.script.util.logging_config import fileConfig |
@@ -42,7 +42,7 b' from kallithea.lib import helpers as h' | |||||
42 | from kallithea.lib.base import BaseController, render |
|
42 | from kallithea.lib.base import BaseController, render | |
43 | from kallithea.lib.auth import LoginRequired, NotAnonymous |
|
43 | from kallithea.lib.auth import LoginRequired, NotAnonymous | |
44 | from kallithea.lib.utils import jsonify |
|
44 | from kallithea.lib.utils import jsonify | |
45 | from kallithea.lib.utils2 import safe_int, time_to_datetime |
|
45 | from kallithea.lib.utils2 import safe_int, safe_unicode, time_to_datetime | |
46 | from kallithea.lib.helpers import Page |
|
46 | from kallithea.lib.helpers import Page | |
47 | from sqlalchemy.sql.expression import or_ |
|
47 | from sqlalchemy.sql.expression import or_ | |
48 | from kallithea.lib.vcs.exceptions import VCSError, NodeNotChangedError |
|
48 | from kallithea.lib.vcs.exceptions import VCSError, NodeNotChangedError | |
@@ -205,7 +205,7 b' class GistsController(BaseController):' | |||||
205 | log.error(traceback.format_exc()) |
|
205 | log.error(traceback.format_exc()) | |
206 | raise HTTPNotFound() |
|
206 | raise HTTPNotFound() | |
207 | if format == 'raw': |
|
207 | if format == 'raw': | |
208 | content = '\n\n'.join([f.content for f in c.files if (f_path is None or f.path == f_path)]) |
|
208 | content = '\n\n'.join([f.content for f in c.files if (f_path is None or safe_unicode(f.path) == f_path)]) | |
209 | response.content_type = 'text/plain' |
|
209 | response.content_type = 'text/plain' | |
210 | return content |
|
210 | return content | |
211 | return render('admin/gists/show.html') |
|
211 | return render('admin/gists/show.html') |
@@ -56,12 +56,12 b' class Command(BasePasterCommand):' | |||||
56 | #get SqlAlchemy session |
|
56 | #get SqlAlchemy session | |
57 | self._init_session() |
|
57 | self._init_session() | |
58 | rm_obsolete = self.options.delete_obsolete |
|
58 | rm_obsolete = self.options.delete_obsolete | |
59 |
|
|
59 | print 'Now scanning root location for new repos ...' | |
60 | added, removed = repo2db_mapper(ScmModel().repo_scan(), |
|
60 | added, removed = repo2db_mapper(ScmModel().repo_scan(), | |
61 | remove_obsolete=rm_obsolete) |
|
61 | remove_obsolete=rm_obsolete) | |
62 | added = ', '.join(added) or '-' |
|
62 | added = ', '.join(added) or '-' | |
63 | removed = ', '.join(removed) or '-' |
|
63 | removed = ', '.join(removed) or '-' | |
64 |
|
|
64 | print 'Scan completed added: %s removed: %s' % (added, removed) | |
65 |
|
65 | |||
66 | def update_parser(self): |
|
66 | def update_parser(self): | |
67 | self.parser.add_option( |
|
67 | self.parser.add_option( |
@@ -69,8 +69,8 b'' | |||||
69 | % for cnt, file in enumerate(c.files): |
|
69 | % for cnt, file in enumerate(c.files): | |
70 | <div id="body" class="codeblock" style="margin-bottom: 4px"> |
|
70 | <div id="body" class="codeblock" style="margin-bottom: 4px"> | |
71 | <div style="padding: 10px 10px 10px 26px;color:#666666"> |
|
71 | <div style="padding: 10px 10px 10px 26px;color:#666666"> | |
72 | <input type="hidden" value="${file.path}" name="org_files"> |
|
72 | <input type="hidden" value="${h.safe_unicode(file.path)}" name="org_files"> | |
73 | <input id="filename_${h.FID('f',file.path)}" name="files" size="30" type="text" value="${file.path}"> |
|
73 | <input id="filename_${h.FID('f',file.path)}" name="files" size="30" type="text" value="${h.safe_unicode(file.path)}"> | |
74 | <select id="mimetype_${h.FID('f',file.path)}" name="mimetypes"/> |
|
74 | <select id="mimetype_${h.FID('f',file.path)}" name="mimetypes"/> | |
75 | </div> |
|
75 | </div> | |
76 | <div class="editor_container"> |
|
76 | <div class="editor_container"> |
@@ -81,9 +81,9 b'' | |||||
81 | <div style="border: 1px solid #EEE;margin-top:20px"> |
|
81 | <div style="border: 1px solid #EEE;margin-top:20px"> | |
82 | <div id="${h.FID('G', file.path)}" class="stats" style="border-bottom: 1px solid #DDD;padding: 8px 14px;"> |
|
82 | <div id="${h.FID('G', file.path)}" class="stats" style="border-bottom: 1px solid #DDD;padding: 8px 14px;"> | |
83 | <a href="${c.gist.gist_url()}">¶</a> |
|
83 | <a href="${c.gist.gist_url()}">¶</a> | |
84 | <b style="margin:0px 0px 0px 4px">${file.path}</b> |
|
84 | <b style="margin:0px 0px 0px 4px">${h.safe_unicode(file.path)}</b> | |
85 | <div style="float:right; margin: -5px"> |
|
85 | <div style="float:right; margin: -5px"> | |
86 | ${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")} |
|
86 | ${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")} | |
87 | </div> |
|
87 | </div> | |
88 | </div> |
|
88 | </div> | |
89 | <div class="code-body"> |
|
89 | <div class="code-body"> |
@@ -55,7 +55,7 b' requirements = [' | |||||
55 | "URLObject==2.3.4", |
|
55 | "URLObject==2.3.4", | |
56 | "Routes==1.13", |
|
56 | "Routes==1.13", | |
57 | "dulwich>=0.9.9,<=0.9.9", |
|
57 | "dulwich>=0.9.9,<=0.9.9", | |
58 |
"mercurial>=2.9,<3. |
|
58 | "mercurial>=2.9,<3.7", | |
59 | ] |
|
59 | ] | |
60 |
|
60 | |||
61 | if sys.version_info < (2, 7): |
|
61 | if sys.version_info < (2, 7): |
General Comments 0
You need to be logged in to leave comments.
Login now