Show More
@@ -35,16 +35,19 b' def downgrade(migrate_engine):' | |||
|
35 | 35 | |
|
36 | 36 | |
|
37 | 37 | def fixups(models, _SESSION): |
|
38 | ||
|
38 | 39 | for db_repo in _SESSION.query(models.Repository).all(): |
|
39 | 40 | |
|
40 | config = db_repo._config | |
|
41 | config.set('extensions', 'largefiles', '') | |
|
41 | try: | |
|
42 | config = db_repo._config | |
|
43 | config.set('extensions', 'largefiles', '') | |
|
42 | 44 | |
|
43 | try: | |
|
44 | scm = db_repo.scm_instance(cache=False, config=config) | |
|
45 | scm = db_repo.scm_instance(cache=False, config=config, vcs_full_cache=False) | |
|
45 | 46 | if scm: |
|
46 | 47 | print(f'installing hook for repo: {db_repo}') |
|
47 | 48 | scm.install_hooks(force=True) |
|
49 | del scm # force GC | |
|
50 | del config | |
|
48 | 51 | except Exception as e: |
|
49 | 52 | print(e) |
|
50 | 53 | print('continue...') |
General Comments 0
You need to be logged in to leave comments.
Login now