<s> """<STR_LIT>""" <EOL> import sys <EOL> import logging <EOL> from modularodm import Q <EOL> from framework . transactions . context import TokuTransaction <EOL> from scripts import utils as script_utils <EOL> from website . app import init_app <EOL> from website . project . model import Comment <EOL> logger = logging . getLogger ( __name__ ) <EOL> def main ( dry = True ) : <EOL> init_app ( routes = False ) <EOL> with TokuTransaction ( ) : <EOL> do_migration ( get_targets ( ) ) <EOL> if dry : <EOL> raise Exception ( '<STR_LIT>' ) <EOL> def get_targets ( ) : <EOL> return Comment . find ( Q ( '<STR_LIT>' , '<STR_LIT>' , None ) ) <EOL> def do_migration ( records ) : <EOL> logger . info ( '<STR_LIT>' . format ( len ( records ) ) ) <EOL> for comment in records : <EOL> logger . info ( '<STR_LIT>' . format ( comment . _id ) ) <EOL> comment . modified = False <EOL> comment . save ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> dry = '<STR_LIT>' in sys . argv <EOL> if not dry : <EOL> script_utils . add_file_logger ( logger , __file__ ) <EOL> main ( dry = dry ) </s>
