server/migractions.py
branchstable
changeset 5019 72734c210836
parent 4951 7dc54e12c606
child 5034 4781870e97d9
equal deleted inserted replaced
5018:2f2d9bc6dca4 5019:72734c210836
    57     """
    57     """
    58 
    58 
    59     def __init__(self, config, schema, interactive=True,
    59     def __init__(self, config, schema, interactive=True,
    60                  repo=None, cnx=None, verbosity=1, connect=True):
    60                  repo=None, cnx=None, verbosity=1, connect=True):
    61         MigrationHelper.__init__(self, config, interactive, verbosity)
    61         MigrationHelper.__init__(self, config, interactive, verbosity)
    62         # no config on shell to a remote instance
       
    63         if not interactive:
    62         if not interactive:
    64             assert cnx
    63             assert cnx
    65             assert repo
    64             assert repo
    66         if cnx is not None:
    65         if cnx is not None:
    67             assert repo
    66             assert repo
    68             self._cnx = cnx
    67             self._cnx = cnx
    69             self.repo = repo
    68             self.repo = repo
    70             if config is not None:
       
    71                 self.session.data['rebuild-infered'] = False
       
    72         elif connect:
    69         elif connect:
    73             self.repo_connect()
    70             self.repo_connect()
       
    71         # no config on shell to a remote instance
       
    72         if config is not None:
       
    73             self.session.data['rebuild-infered'] = False
       
    74             self.repo.hm.call_hooks('server_maintenance', repo=self.repo)
    74         if not schema:
    75         if not schema:
    75             schema = config.load_schema(expand_cubes=True)
    76             schema = config.load_schema(expand_cubes=True)
    76         self.fs_schema = schema
    77         self.fs_schema = schema
    77         self._synchronized = set()
    78         self._synchronized = set()
    78 
    79