HG20* CHANGEGROUP version02nbchanges11. x *tAԆ3a߳x *tAԆ3a߳8c03e2a19d025c15d0adb3e11124772a63c77e5c Cédric Krier 1393884581 -3600 templates/index.html trydevpi.fcgi trydevpi.py Initial commit[u.+QM[O%x *tAԆ3a߳[u.+QM[O%n2e2dd4628308ef1ec368deb2276a817c776399e4 Cédric Krier 1393887052 -3600 trydevpi.fcgi Fix typo>K(PjOLPP^\[u.+QM[O%[u.+QM[O%K(PjOLPP^\))8f5a0147b8618585bab9a865cc47401b90b45c01 Fe1394063763 -3600 trydevpi.py fnlFix url for module packages The repository doesn't contain the 'trytond_' prefix and it should be stripped.Nh{o%7K(PjOLPP^\Nh{o%747efb8a2f4b15069d3a50733d38146761a9ca3b5 Cédric Krier 1394063880 -3600 trydevpi.py Add optional branch filteringLb" }-IeO!ZGNh{o%7Nh{o%7Lb" }-IeO!ZG))a3fc3a668728645dfb7cddef198b51278cba4707 Fc&1397684425 -7200 templates/index.html dAdd line break 2oXk; 8Lb" }-IeO!ZG 2oXk; 8wa6dbf06fb7bb4b77ea9f31ba05276c65e3873015 Cédric Krier 1397684974 -7200 templates/index.html Order urls;)[Jf-fg0L 2oXk; 8 2oXk; 8;)[Jf-fg0L))0d3765e56ca29e7dad829d274a89b68af2cdfb1a Fl1422004980 -3600 trydevpi.fcgi mwMark fcgi as executable CZ;Z Jwgan;)[Jf-fg0LCZ;Z Jwgand0ae5bea11fd3e1b17502316dc69823bbf552d0d Cédric Krier 1422005061 -3600 trydevpi.py Let uses SSL to clone from mercurial review12891002{0RW;̩T]CZ;Z JwganCZ;Z Jwgan{0RW;̩T]))e1571de1a362ee7ba9d58d91093b25073724750d FW1422530679 -3600 d$Manage modules without release tags review11831002\c;{Ϛ=h#:0"{0RW;̩T]c;{Ϛ=h#:0"11829b689de77a6a6a4e1487fd3e2719d66f68ab Cédric Krier 1530863845 -7200 trydevpi.py Add mirror arguments The mirror argument allow to use Github or Bitbucket mirrors to unload hg.tryton.org issue7536 review48491002 `Ţy bWdc;{Ϛ=h#:0" `Ţy bWdaae0eac67f72baebb3dbdb744c8b0dc0b802c31c Cédric Krier 1540923155 -3600 trydevpi.py Replace deprecated flask.ext import⡝\Э$w*c~\x *tAԆ3a߳templates/index.htmlb7619791247f57d308c2fc9d116218f3c3b52a3a trydevpi.fcgieec6fd08a0f79b232d1c2acddd74f38ac4493648 trydevpi.pya7656e693d99dc19cb66dbc34059202ee9b8cf00 .-bh޲'j|wc⡝\Э$w*c~\⡝\Э$w*c~\[u.+QM[O%>u7trydevpi.fcgi18f2abc85418e288d5aa9dd5773850acfa3d533f ZGaeG@\.-bh޲'j|wc.-bh޲'j|wcK(PjOLPP^\u5trydevpi.pybc20f460427adfceeb80302f2e15f986c2b1ba4a G︢Piӥ3ӁFvZGaeG@\ZGaeG@\Nh{o%7u5trydevpi.py6020330e4012e534f9f2067a9a52dd59c4a5acd3 :f(d]|Q'GG︢Piӥ3ӁFvG︢Piӥ3ӁFvLb" }-IeO!ZG>>templates/index.html7ce26dd86951d1b8cba198dd52361fc602f95969 oKw1'le0:f(d]|Q'G:f(d]|Q'G 2oXk; 8>>templates/index.html90f91e89db7bf26d5bf1b159aafd3f5391e52b00 7el}'JoKw1'le0oKw1'le0;)[Jf-fg0L>u8trydevpi.fcgi18f2abc85418e288d5aa9dd5773850acfa3d533fx Ю[>P#i;U- 7el}'J 7el}'JCZ;Z Jwganv5trydevpi.pyb22b45c44cece41089011c9829eece42e2c1038d Wb{Ս ;%7$u Ю[>P#i;U- Ю[>P#i;U- {0RW;̩T]v5trydevpi.py68a86a7cd314266269d83c537713b795942ffd17 hzjjN>'ohWb{Ս ;%7$u Wb{Ս ;%7$u c;{Ϛ=h#:0"v5trydevpi.py09d9e0f235cd34907ffac2874fd8081b2163d71a rtL hzjjN>'ohhzjjN>'oh `Ţy bWdv5trydevpi.pye385f4c26b0bb2a733c29b7d5d7581a5d7f2c124 templates/index.htmlxa$Wbõ*:x *tAԆ3a߳ TryDevPI - The Tryton Development Package Index {% for name, url in urls.iteritems() %} {{ name }} {% endfor %} |miQѸˡR6Yia$Wbõ*:a$Wbõ*:Lb" }-IeO!ZG0 {{ name }}
{m[Y?S+|miQѸˡR6Yi|miQѸˡR6Yi 2oXk; 8- {% for name, url in urls|dictsort %} trydevpi.fcgiL#-*tI6Hx *tAԆ3a߳#!/usr/bin/env python from flup.server.fcgi import WSGIServer from trydevpy import app from werkzeug.contrib.fixers import LighttpdCGIRootFix if __name__ == '__main__': WSGIServer(LighttpdCGIRootFix(app)).run() Tժw8P=S?#-*tI6H#-*tI6H[u.+QM[O%>Wfrom trydevpi import app trydevpi.py ǧeni=f@Y .x *tAԆ3a߳ Sfrom flask import Flask, render_template from flask.ext.cache import Cache from mercurial import ui, hg from mercurial.hgweb.hgwebdir_mod import findrepos BASE_URL = 'hg+http://hg.tryton.org/' BASE_MODULE_URL = 'hg+http://hg.tryton.org/modules/' app = Flask(__name__) cache = Cache(app, config={'CACHE_TYPE': 'simple'}) app.config.from_envvar('TRYDEVPI_SETTINGS', silent=True) def get_urls(): urls = {} lui = ui.ui() lui.readconfig(app.config['HG_CONFIG'], trust=True) paths = lui.configitems('paths') for name, path in findrepos(paths): if (name not in ('trytond', 'proteus', 'tryton') and not name.startswith('modules/')): continue package = get_package(name) repo = hg.repository(lui, path) last_major = {} max_version = (-1, -1) for version in repo.tags(): try: major, minor, bug = map(int, version.split('.')) except ValueError: continue key = (major, minor) if max_version < key: max_version = key if last_major.get(key, -1) < bug: last_major[key] = bug last_major[max_version[0], max_version[1] + 1] = -1 for (major, minor), bug in last_major.iteritems(): bug += 1 version = get_version(major, minor, bug) branch = get_branch(major, minor) if not repo.branchheads(branch): continue url = get_url(package, branch, version) urls['%s-%s' % (package, version)] = url return urls def get_package(name): if name in ('trytond', 'proteus', 'tryton'): return name else: return 'trytond_%s' % name[len('modules/'):] def get_version(major, minor, bug): template = '%(major)s.%(minor)s.%(bug)s.dev0' if minor % 2: template = '%(major)s.%(minor)s.dev0' return template % { 'major': major, 'minor': minor, 'bug': bug, } def get_branch(major, minor): if minor % 2: return 'default' else: return '%s.%s' % (major, minor) def get_url(name, branch, version): if name.startswith('trytond_'): base = BASE_MODULE_URL else: base = BASE_URL return '%(base)s%(name)s@%(branch)s#egg=%(name)s-%(version)s' % { 'base': base, 'name': name, 'branch': branch, 'version': version, } @app.route('/') @cache.cached(timeout=2 * 60 * 60) def index(): return render_template('index.html', urls=get_urls()) if __name__ == '__main__': app.run(debug=True) & `Bz0/.±Jeni=f@Y .eni=f@Y .K(PjOLPP^\7 url = BASE_MODULE_URL + name[len('trytond_'):]  Mo url = BASE_URL + name return '%(url)s@%(branch)s#egg=%(name)s-%(version)s' % { 'url': url, ` 3@4zRYĥӼ `Bz0/.±J `Bz0/.±JNh{o%7}"def get_urls(branch_filter=None): r if (not repo.branchheads(branch) or (branch_filter and branch != branch_filter)): @app.route('/') 2Ydef index(branch=None): return render_template('index.html', urls=get_urls(branch)) Ѳ+EL)B` 3@4zRYĥ` 3@4zRYĥCZ;Z Jwgan]BASE_URL = 'hg+https://hg.tryton.org/' BASE_MODULE_URL = 'hg+https://hg.tryton.org/modules/' Chj|&bi