##// END OF EJS Templates
Allowing multiple issue servers to be autolinked in the changeset view;...
Allowing multiple issue servers to be autolinked in the changeset view; linking is now contingent on issue_server_link, issue_pat and issue_prefix being defined; multiple servers can be used by specifying a common suffix on all the above variables, ie .. issue_server_link_1 issue_pat_1 issue_prefix_1 .. and .. issue_server_link_other issue_pat_other issue_prefix_other .. would be treated as two distinct servers, but .. issue_pat_thing .. would be ignored (since the other two requisite vars aren't present). This patch is backwards compatible with existing variables (as a suffix isn't needed).

File last commit:

r1632:5b2cf21b beta
r2865:6d9b3ade beta
Show More
pylons.py_tmpl
30 lines | 857 B | text/plain | TextLexer
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
from sqlalchemy import engine_from_config
from paste.deploy.loadwsgi import ConfigLoader
from migrate.versioning.shell import main
from {{ locals().pop('repository_name') }}.model import migrations
if '-c' in sys.argv:
pos = sys.argv.index('-c')
conf_path = sys.argv[pos + 1]
del sys.argv[pos:pos + 2]
else:
conf_path = 'development.ini'
{{py:
_vars = locals().copy()
del _vars['__template_name__']
defaults = ", ".join(["%s='%s'" % var for var in _vars.iteritems()])
}}
conf_dict = ConfigLoader(conf_path).parser._sections['app:main']
# migrate supports passing url as an existing Engine instance (since 0.6.0)
# usage: migrate -c path/to/config.ini COMMANDS
if __name__ == '__main__':
main(url=engine_from_config(conf_dict), repository=migrations.__path__[0],{{ defaults }})