comparison rhodecode/lib/paster_commands/make_rcextensions.py @ 4186:7e5f8c12a3fc kallithea-2.2.5-rebrand

First step in two-part process to rename directories to kallithea. This first step is to change all references in the files where they refer to the old directory name.
author Bradley M. Kuhn <bkuhn@sfconservancy.org>
date Wed, 02 Jul 2014 19:04:28 -0400
parents e9f6b533a8f6
children
comparison
equal deleted inserted replaced
4185:aaa7c3331186 4186:7e5f8c12a3fc
10 # GNU General Public License for more details. 10 # GNU General Public License for more details.
11 # 11 #
12 # You should have received a copy of the GNU General Public License 12 # You should have received a copy of the GNU General Public License
13 # along with this program. If not, see <http://www.gnu.org/licenses/>. 13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 """ 14 """
15 rhodecode.lib.paster_commands.make_rcextensions 15 kallithea.lib.paster_commands.make_rcextensions
16 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 16 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 17
18 make-rcext paster command for RhodeCode 18 make-rcext paster command for RhodeCode
19 19
20 :created_on: Mar 6, 2012 20 :created_on: Mar 6, 2012
29 import os 29 import os
30 import sys 30 import sys
31 import logging 31 import logging
32 import pkg_resources 32 import pkg_resources
33 33
34 from rhodecode.lib.utils import BasePasterCommand, ask_ok 34 from kallithea.lib.utils import BasePasterCommand, ask_ok
35 35
36 # Add location of top level folder to sys.path 36 # Add location of top level folder to sys.path
37 from os.path import dirname as dn 37 from os.path import dirname as dn
38 rc_path = dn(dn(dn(os.path.realpath(__file__)))) 38 rc_path = dn(dn(dn(os.path.realpath(__file__))))
39 sys.path.append(rc_path) 39 sys.path.append(rc_path)
64 f.write(tmpl) 64 f.write(tmpl)
65 log.info('Writen new extensions file to %s' % ext_file) 65 log.info('Writen new extensions file to %s' % ext_file)
66 66
67 here = config['here'] 67 here = config['here']
68 tmpl = pkg_resources.resource_string( 68 tmpl = pkg_resources.resource_string(
69 'rhodecode', os.path.join('config', 'rcextensions', '__init__.py') 69 'kallithea', os.path.join('config', 'rcextensions', '__init__.py')
70 ) 70 )
71 ext_file = os.path.join(here, 'rcextensions', '__init__.py') 71 ext_file = os.path.join(here, 'rcextensions', '__init__.py')
72 if os.path.exists(ext_file): 72 if os.path.exists(ext_file):
73 msg = ('Extension file already exists, do you want ' 73 msg = ('Extension file already exists, do you want '
74 'to overwrite it ? [y/n]') 74 'to overwrite it ? [y/n]')