Changeset - d6fa7805e687
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-07-20 12:52:28
marcin@python-works.com
we must rollback if repo2db mapper cleanup fails ! Session blows up, and that code still throws an error without it
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/utils.py
Show inline comments
 
@@ -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...")
0 comments (0 inline, 0 general)