diff --git a/rhodecode/lib/paster_commands/ishell.py b/kallithea/lib/paster_commands/ishell.py copy from rhodecode/lib/paster_commands/ishell.py copy to kallithea/lib/paster_commands/ishell.py --- a/rhodecode/lib/paster_commands/ishell.py +++ b/kallithea/lib/paster_commands/ishell.py @@ -1,16 +1,4 @@ # -*- coding: utf-8 -*- -""" - rhodecode.lib.paster_commands.ishell - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - interactive shell paster command for RhodeCode - - - :created_on: Apr 4, 2013 - :author: marcink - :copyright: (C) 2010-2013 Marcin Kuzminski - :license: GPLv3, see COPYING for more details. -""" # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or @@ -23,15 +11,29 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . +""" +kallithea.lib.paster_commands.ishell +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +interactive shell paster command for Kallithea + +This file was forked by the Kallithea project in July 2014. +Original author and date, and relevant copyright and licensing information is below: +:created_on: Apr 4, 2013 +:author: marcink +:copyright: (c) 2013 RhodeCode GmbH, and others. +:license: GPLv3, see LICENSE.md for more details. +""" + from __future__ import with_statement import os import sys import logging -from rhodecode.lib.utils import BasePasterCommand +from kallithea.lib.utils import BasePasterCommand -# fix rhodecode import +# Add location of top level folder to sys.path from os.path import dirname as dn rc_path = dn(dn(dn(os.path.realpath(__file__)))) sys.path.append(rc_path) @@ -45,7 +47,7 @@ class Command(BasePasterCommand): min_args = 1 usage = "CONFIG_FILE" - group_name = "RhodeCode" + group_name = "Kallithea" takes_config_file = -1 parser = BasePasterCommand.standard_parser(verbose=True) summary = "Interactive shell" @@ -60,14 +62,14 @@ class Command(BasePasterCommand): import time import shutil import datetime - from rhodecode.model.db import * + from kallithea.model.db import * try: from IPython import embed from IPython.config.loader import Config cfg = Config() cfg.InteractiveShellEmbed.confirm_exit = False - embed(config=cfg, banner1="RhodeCode IShell.") + embed(config=cfg, banner1="Kallithea IShell.") except ImportError: print 'ipython installation required for ishell' sys.exit(-1)