equal
deleted
inserted
replaced
342 """ |
342 """ |
343 session = repo._get_session(cnx.sessionid, setcnxset=True) |
343 session = repo._get_session(cnx.sessionid, setcnxset=True) |
344 # yo, launch checks |
344 # yo, launch checks |
345 if checks: |
345 if checks: |
346 eids_cache = {} |
346 eids_cache = {} |
347 with security_enabled(session, read=False): # ensure no read security |
347 with security_enabled(session, read=False, write=False): # ensure no read security |
348 for check in checks: |
348 for check in checks: |
349 check_func = globals()['check_%s' % check] |
349 check_func = globals()['check_%s' % check] |
350 check_func(repo.schema, session, eids_cache, fix=fix) |
350 check_func(repo.schema, session, eids_cache, fix=fix) |
351 if fix: |
351 if fix: |
352 cnx.commit() |
352 cnx.commit() |