##// END OF EJS Templates
pull-requests: fixed case for GIT repositories when a merge check failed due to merge conflicts the pull request wrongly reported missing commits....
pull-requests: fixed case for GIT repositories when a merge check failed due to merge conflicts the pull request wrongly reported missing commits. - we're now searching for dangling commits in a repo that has them and cannot see them because of failed merge checks. - pull-request: will save metadata during merge simulation so merge conflicts are permanently stored, and showed to all users.

File last commit:

r1543:4acfe019 default
r4299:04e45b92 default
Show More
050_version_4_0_0.py
37 lines | 867 B | text/x-python | PythonLexer
# -*- coding: utf-8 -*-
import logging
from sqlalchemy.orm.attributes import flag_modified
from rhodecode.lib.dbmigrate.versions import _reset_base
from rhodecode.model import init_model_encryption, meta
log = logging.getLogger(__name__)
def upgrade(migrate_engine):
"""
Upgrade operations go here.
Don't create your own engine; bind migrate_engine to your metadata
"""
_reset_base(migrate_engine)
from rhodecode.lib.dbmigrate.schema import db_3_7_0_0
init_model_encryption(db_3_7_0_0)
fixups(db_3_7_0_0, meta.Session)
def downgrade(migrate_engine):
pass
def fixups(models, Session):
for repo in models.Repository.get_all():
if repo.clone_uri:
log.info('Encrypting clone uri in repo %s', repo)
flag_modified(repo, 'clone_uri')
Session().add(repo)
Session().commit()