equal
deleted
inserted
replaced
1 # copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
1 # copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
3 # |
3 # |
4 # This file is part of CubicWeb. |
4 # This file is part of CubicWeb. |
5 # |
5 # |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
6 # CubicWeb is free software: you can redistribute it and/or modify it under the |
399 if not self.config.automatic: |
399 if not self.config.automatic: |
400 sections = set(sect.lower() for sect, opt, odict in config.all_options() |
400 sections = set(sect.lower() for sect, opt, odict in config.all_options() |
401 if 'type' in odict |
401 if 'type' in odict |
402 and odict.get('level') <= self.config.config_level) |
402 and odict.get('level') <= self.config.config_level) |
403 for section in sections: |
403 for section in sections: |
404 if section not in ('main', 'email', 'pyro', 'web'): |
404 if section not in ('main', 'email', 'web'): |
405 print '\n' + underline_title('%s options' % section) |
405 print '\n' + underline_title('%s options' % section) |
406 config.input_config(section, self.config.config_level) |
406 config.input_config(section, self.config.config_level) |
407 # write down configuration |
407 # write down configuration |
408 config.save() |
408 config.save() |
409 self._handle_win32(config, appid) |
409 self._handle_win32(config, appid) |
898 }), |
898 }), |
899 |
899 |
900 ('repo-uri', |
900 ('repo-uri', |
901 {'short': 'H', 'type' : 'string', 'metavar': '<protocol>://<[host][:port]>', |
901 {'short': 'H', 'type' : 'string', 'metavar': '<protocol>://<[host][:port]>', |
902 'help': 'URI of the CubicWeb repository to connect to. URI can be \ |
902 'help': 'URI of the CubicWeb repository to connect to. URI can be \ |
903 pyro://[host:port] the Pyro name server host; if the pyro nameserver is not set, \ |
903 a ZMQ URL or inmemory:// (default) use an in-memory repository. THIS OPTION IS DEPRECATED, \ |
904 it will be detected by using a broadcast query, a ZMQ URL or \ |
|
905 inmemory:// (default) use an in-memory repository. THIS OPTION IS DEPRECATED, \ |
|
906 directly give URI as instance id instead', |
904 directly give URI as instance id instead', |
907 'group': 'remote' |
905 'group': 'remote' |
908 }), |
906 }), |
909 ) |
907 ) |
910 |
908 |
951 def run(self, args): |
949 def run(self, args): |
952 appuri = args.pop(0) |
950 appuri = args.pop(0) |
953 if self.config.repo_uri: |
951 if self.config.repo_uri: |
954 warn('[3.16] --repo-uri option is deprecated, directly give the URI as instance id', |
952 warn('[3.16] --repo-uri option is deprecated, directly give the URI as instance id', |
955 DeprecationWarning) |
953 DeprecationWarning) |
956 if urlparse(self.config.repo_uri).scheme in ('pyro', 'inmemory'): |
954 if urlparse(self.config.repo_uri).scheme == 'inmemory': |
957 appuri = '%s/%s' % (self.config.repo_uri.rstrip('/'), appuri) |
955 appuri = '%s/%s' % (self.config.repo_uri.rstrip('/'), appuri) |
958 |
956 |
959 from cubicweb.utils import parse_repo_uri |
957 from cubicweb.utils import parse_repo_uri |
960 protocol, hostport, appid = parse_repo_uri(appuri) |
958 protocol, hostport, appid = parse_repo_uri(appuri) |
961 if protocol == 'inmemory': |
959 if protocol == 'inmemory': |