Mercurial > kallithea
comparison rhodecode/controllers/admin/repos.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 | ffd45b185016 |
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.controllers.admin.repos | 15 kallithea.controllers.admin.repos |
16 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 16 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
17 | 17 |
18 Repositories controller for RhodeCode | 18 Repositories controller for RhodeCode |
19 | 19 |
20 :created_on: Apr 7, 2010 | 20 :created_on: Apr 7, 2010 |
31 from pylons import request, tmpl_context as c, url | 31 from pylons import request, tmpl_context as c, url |
32 from pylons.controllers.util import redirect | 32 from pylons.controllers.util import redirect |
33 from pylons.i18n.translation import _ | 33 from pylons.i18n.translation import _ |
34 from sqlalchemy.sql.expression import func | 34 from sqlalchemy.sql.expression import func |
35 | 35 |
36 from rhodecode.lib import helpers as h | 36 from kallithea.lib import helpers as h |
37 from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator, \ | 37 from kallithea.lib.auth import LoginRequired, HasPermissionAllDecorator, \ |
38 HasRepoPermissionAllDecorator, NotAnonymous,HasPermissionAny, \ | 38 HasRepoPermissionAllDecorator, NotAnonymous,HasPermissionAny, \ |
39 HasRepoGroupPermissionAny, HasRepoPermissionAnyDecorator | 39 HasRepoGroupPermissionAny, HasRepoPermissionAnyDecorator |
40 from rhodecode.lib.base import BaseRepoController, render | 40 from kallithea.lib.base import BaseRepoController, render |
41 from rhodecode.lib.utils import action_logger, repo_name_slug, jsonify | 41 from kallithea.lib.utils import action_logger, repo_name_slug, jsonify |
42 from rhodecode.lib.helpers import get_token | 42 from kallithea.lib.helpers import get_token |
43 from rhodecode.lib.vcs import RepositoryError | 43 from kallithea.lib.vcs import RepositoryError |
44 from rhodecode.model.meta import Session | 44 from kallithea.model.meta import Session |
45 from rhodecode.model.db import User, Repository, UserFollowing, RepoGroup,\ | 45 from kallithea.model.db import User, Repository, UserFollowing, RepoGroup,\ |
46 RhodeCodeSetting, RepositoryField | 46 RhodeCodeSetting, RepositoryField |
47 from rhodecode.model.forms import RepoForm, RepoFieldForm, RepoPermsForm | 47 from kallithea.model.forms import RepoForm, RepoFieldForm, RepoPermsForm |
48 from rhodecode.model.scm import ScmModel, RepoGroupList, RepoList | 48 from kallithea.model.scm import ScmModel, RepoGroupList, RepoList |
49 from rhodecode.model.repo import RepoModel | 49 from kallithea.model.repo import RepoModel |
50 from rhodecode.lib.compat import json | 50 from kallithea.lib.compat import json |
51 from rhodecode.lib.exceptions import AttachedForksError | 51 from kallithea.lib.exceptions import AttachedForksError |
52 from rhodecode.lib.utils2 import safe_int | 52 from kallithea.lib.utils2 import safe_int |
53 | 53 |
54 log = logging.getLogger(__name__) | 54 log = logging.getLogger(__name__) |
55 | 55 |
56 | 56 |
57 class ReposController(BaseRepoController): | 57 class ReposController(BaseRepoController): |
219 def repo_check(self, repo_name): | 219 def repo_check(self, repo_name): |
220 c.repo = repo_name | 220 c.repo = repo_name |
221 task_id = request.GET.get('task_id') | 221 task_id = request.GET.get('task_id') |
222 | 222 |
223 if task_id and task_id not in ['None']: | 223 if task_id and task_id not in ['None']: |
224 from rhodecode import CELERY_ON | 224 from kallithea import CELERY_ON |
225 from celery.result import AsyncResult | 225 from celery.result import AsyncResult |
226 if CELERY_ON: | 226 if CELERY_ON: |
227 task = AsyncResult(task_id) | 227 task = AsyncResult(task_id) |
228 if task.failed(): | 228 if task.failed(): |
229 raise HTTPInternalServerError(task.traceback) | 229 raise HTTPInternalServerError(task.traceback) |