1. gwaldo
  2. RhodeCode

Commits

Marcin Kuzminski  committed d6fa780

we must rollback if repo2db mapper cleanup fails ! Session blows up, and that code still throws an error without it

  • Participants
  • Parent commits 4b17216
  • Branches beta

Comments (0)

Files changed (1)

File rhodecode/lib/utils.py

View file
         # 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)
                 except:
                     #don't hold further removals on error
                     log.error(traceback.format_exc())
+                    sa.rollback()
 
     # clear cache keys
     log.debug("Clearing cache keys now...")