diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -479,7 +479,7 @@ def repo2db_mapper(initial_repo_list, re # remove from database those repositories that are not in the filesystem for repo in sa.query(Repository).all(): if repo.repo_name not in initial_repo_list.keys(): - log.debug("Removing non existing repository found in db %s" % + log.debug("Removing non existing repository found in db `%s`" % repo.repo_name) try: sa.delete(repo) @@ -488,6 +488,7 @@ def repo2db_mapper(initial_repo_list, re except: #don't hold further removals on error log.error(traceback.format_exc()) + sa.rollback() # clear cache keys log.debug("Clearing cache keys now...")