##// END OF EJS Templates
diff_block: fix link to file revisions...
diff_block: fix link to file revisions Pull requests would link to file revisions in the wrong repo. That was obviously only visible when merging between different repos - but then it would link to a non-existing revision. diff_block is apparently used pull-request-style with the 'b' revision of the diff shown first. It thus also has to point at the 'other' repo which is where the other revision can be found.

File last commit:

r1632:5b2cf21b beta
r3517:f8daaaf1 beta
Show More
pylons.py_tmpl
30 lines | 857 B | text/plain | TextLexer
added dbmigrate package, added model changes...
r833 #!/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
Synced with latest sqlalchemy-migrate, added new upcomming migration for 1.3
r1632 if __name__ == '__main__':
main(url=engine_from_config(conf_dict), repository=migrations.__path__[0],{{ defaults }})