cubicweb/cwctl.py
branch3.25
changeset 12139 b5be819872bb
parent 12120 707139a9eb00
child 12253 9165f4b7426b
equal deleted inserted replaced
12138:10a18c6c5e10 12139:b5be819872bb
   688         ('fs-only',
   688         ('fs-only',
   689          {'short': 's', 'action' : 'store_true',
   689          {'short': 's', 'action' : 'store_true',
   690           'default': False,
   690           'default': False,
   691           'help': 'only upgrade files on the file system, not the database.'}),
   691           'help': 'only upgrade files on the file system, not the database.'}),
   692 
   692 
       
   693         ('no-config-update',
       
   694          {'short': 'C', 'action': 'store_true',
       
   695           'default': False,
       
   696           'help': 'do NOT update config file if set.'}),
       
   697 
   693         ('nostartstop',
   698         ('nostartstop',
   694          {'short': 'n', 'action' : 'store_true',
   699          {'short': 'n', 'action' : 'store_true',
   695           'default': False,
   700           'default': False,
   696           'help': 'don\'t try to stop instance before migration and to restart it after.'}),
   701           'help': 'don\'t try to stop instance before migration and to restart it after.'}),
   697 
   702 
   766                     mih.migrate(vcconf, reversed(toupgrade), self.config)
   771                     mih.migrate(vcconf, reversed(toupgrade), self.config)
   767             clear_cache(config, 'instance_md5_version')
   772             clear_cache(config, 'instance_md5_version')
   768         else:
   773         else:
   769             print('-> no data migration needed for instance %s.' % appid)
   774             print('-> no data migration needed for instance %s.' % appid)
   770         # rewrite main configuration file
   775         # rewrite main configuration file
   771         mih.rewrite_configuration()
   776         if not self.config.no_config_update:
       
   777             mih.rewrite_configuration()
   772         mih.shutdown()
   778         mih.shutdown()
   773         # handle i18n upgrade
   779         # handle i18n upgrade
   774         if not self.i18nupgrade(config):
   780         if not self.i18nupgrade(config):
   775             return
   781             return
   776         print()
   782         print()