# HG changeset patch # User Marcin Kuzminski # Date 2010-12-09 19:39:11 # Node ID ceb9f419b7fe5c794affb7627ed78f19ac108d1d # Parent 81e8dfa3beb5ccd6ab3fc71e8bccd6e67c90ee05 some extra fixes added docs string diff --git a/rhodecode/controllers/admin/repos.py b/rhodecode/controllers/admin/repos.py --- a/rhodecode/controllers/admin/repos.py +++ b/rhodecode/controllers/admin/repos.py @@ -1,8 +1,15 @@ -#!/usr/bin/env python -# encoding: utf-8 -# repos controller for pylons -# Copyright (C) 2009-2010 Marcin Kuzminski -# +# -*- coding: utf-8 -*- +""" + rhodecode.controllers.admin.repos + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Admin controller for RhodeCode + + :created_on: Apr 7, 2010 + :author: marcink + :copyright: (C) 2009-2010 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; version 2 @@ -17,17 +24,18 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. -""" -Created on April 7, 2010 -admin controller for pylons -@author: marcink -""" + +import logging +import traceback +import formencode +from operator import itemgetter from formencode import htmlfill -from operator import itemgetter + from paste.httpexceptions import HTTPInternalServerError from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from pylons.i18n.translation import _ + from rhodecode.lib import helpers as h from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator, \ HasPermissionAnyDecorator @@ -37,9 +45,7 @@ from rhodecode.model.db import User from rhodecode.model.forms import RepoForm from rhodecode.model.scm import ScmModel from rhodecode.model.repo import RepoModel -import formencode -import logging -import traceback + log = logging.getLogger(__name__) @@ -283,6 +289,7 @@ class ReposController(BaseController): category='error') return redirect(url('repos')) + defaults = c.repo_info.__dict__ if c.repo_info.user: defaults.update({'user':c.repo_info.user.username})