comparison kallithea/__init__.py @ 6013:0b6d2ca7175f

db: drop RhodeCode compatibility (database rebranding etc.) To migrate from RhodeCode, users will have to first migrate to Kallithea 0.3.2.
author Søren Løvborg <sorenl@unity3d.com>
date Mon, 18 Jul 2016 14:03:17 +0200
parents d5e16407bdbb
children c7ef77ab2f95
comparison
equal deleted inserted replaced
6012:4f4a73acd6b3 6013:0b6d2ca7175f
42 CONFIG = {} 42 CONFIG = {}
43 43
44 # Linked module for extensions 44 # Linked module for extensions
45 EXTENSIONS = {} 45 EXTENSIONS = {}
46 46
47 # BRAND controls internal references in database and config to the products
48 # own name.
49 #
50 # NOTE: If you want compatibility with a database that was originally created
51 # for use with the RhodeCode software product, change BRAND to "rhodecode",
52 # either by editing here or by creating a new file:
53 # echo "BRAND = 'rhodecode'" > kallithea/brand.py
54
55 BRAND = "kallithea"
56 try: 47 try:
57 from kallithea.brand import BRAND 48 import kallithea.brand
58 except ImportError: 49 except ImportError:
59 pass 50 pass
60 51 else:
61 # Prefix for the ui and settings table names 52 assert False, 'Database rebranding is no longer supported; see README.'
62 DB_PREFIX = (BRAND + "_") if BRAND != "kallithea" else ""
63 53
64 # Users.extern_type and .extern_name value for local users 54 # Users.extern_type and .extern_name value for local users
65 EXTERN_TYPE_INTERNAL = BRAND if BRAND != 'kallithea' else 'internal' 55 EXTERN_TYPE_INTERNAL = 'internal'
66 56
67 # db_migrate_version.repository_id value, same as kallithea/lib/dbmigrate/migrate.cfg 57 # db_migrate_version.repository_id value, same as kallithea/lib/dbmigrate/migrate.cfg
68 DB_MIGRATIONS = BRAND + "_db_migrations" 58 DB_MIGRATIONS = "kallithea_db_migrations"
69 59
70 try: 60 try:
71 from kallithea.lib import get_current_revision 61 from kallithea.lib import get_current_revision
72 _rev = get_current_revision(quiet=True) 62 _rev = get_current_revision(quiet=True)
73 if _rev and len(VERSION) > 3: 63 if _rev and len(VERSION) > 3: