Changeset - f2075ef95ae2
[Not reviewed]
default
0 1 0
Mads Kiilerich - 10 years ago 2016-03-02 00:14:31
madski@unity3d.com
unicode: Fix unicode conversion in repo2db_mapper
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/utils.py
Show inline comments
 
@@ -540,14 +540,15 @@ def repo2db_mapper(initial_repo_list, re
 
        elif install_git_hooks:
 
            if db_repo.repo_type == 'git':
 
                ScmModel().install_git_hooks(db_repo.scm_instance, force_create=overwrite_git_hooks)
 

	
 
    removed = []
 
    # remove from database those repositories that are not in the filesystem
 
    unicode_initial_repo_list = set(safe_unicode(name) for name in initial_repo_list)
 
    for repo in sa.query(Repository).all():
 
        if repo.repo_name not in initial_repo_list.keys():
 
        if repo.repo_name not in unicode_initial_repo_list:
 
            if remove_obsolete:
 
                log.debug("Removing non-existing repository found in db `%s`",
 
                          repo.repo_name)
 
                try:
 
                    RepoModel(sa).delete(repo, forks='detach', fs_remove=False)
 
                    sa.commit()
0 comments (0 inline, 0 general)