Changeset - 0bc8975f5365
[Not reviewed]
default
0 7 0
Thomas De Schampheleire - 11 years ago 2015-03-12 22:19:57
thomas.de.schampheleire@gmail.com
controllers: trivial typo fixes
7 files changed with 14 insertions and 14 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/admin/auth_settings.py
Show inline comments
 
@@ -83,13 +83,13 @@ class AuthSettingsController(BaseControl
 
                if "default" in v:
 
                    _defaults[fullname] = v["default"]
 
                # Current values will be the default on the form, if there are any
 
                setting = Setting.get_by_name(fullname)
 
                if setting:
 
                    _defaults[fullname] = setting.app_settings_value
 
        # we want to show , seperated list of enabled plugins
 
        # we want to show , separated list of enabled plugins
 
        _defaults['auth_plugins'] = ','.join(_defaults['auth_plugins'])
 
        if defaults:
 
            _defaults.update(defaults)
 

	
 
        formglobals["defaults"] = _defaults
 
        # set template context variables
kallithea/controllers/admin/gists.py
Show inline comments
 
@@ -282,12 +282,12 @@ class GistsController(BaseController):
 
        last_rev = c.gist.scm_instance.get_changeset()
 
        success = True
 
        revision = request.POST.get('revision')
 

	
 
        ##TODO: maybe move this to model ?
 
        if revision != last_rev.raw_id:
 
            log.error('Last revision %s is different then submited %s'
 
            log.error('Last revision %s is different than submitted %s'
 
                      % (revision, last_rev))
 
            # our gist has newer version than we
 
            success = False
 

	
 
        return {'success': success}
kallithea/controllers/admin/repos.py
Show inline comments
 
@@ -505,14 +505,14 @@ class ReposController(BaseRepoController
 
            encoding="UTF-8",
 
            force_defaults=False)
 

	
 
    @HasRepoPermissionAllDecorator('repository.admin')
 
    def edit_advanced_journal(self, repo_name):
 
        """
 
        Set's this repository to be visible in public journal,
 
        in other words assing default user to follow this repo
 
        Sets this repository to be visible in public journal,
 
        in other words asking default user to follow this repo
 

	
 
        :param repo_name:
 
        """
 

	
 
        cur_token = request.POST.get('auth_token')
 
        token = get_token()
kallithea/controllers/api/api.py
Show inline comments
 
@@ -305,13 +305,13 @@ class ApiController(JSONRPCController):
 

	
 
    # permission check inside
 
    def lock(self, apiuser, repoid, locked=Optional(None),
 
             userid=Optional(OAttr('apiuser'))):
 
        """
 
        Set locking state on given repository by given user. If userid param
 
        is skipped, then it is set to id of user whos calling this method.
 
        is skipped, then it is set to id of user who is calling this method.
 
        If locked param is skipped then function shows current lock state of
 
        given repo. This command can be executed only using api_key belonging
 
        to user with admin rights or regular user that have admin or write
 
        access to repository.
 

	
 
        :param apiuser: filled automatically from apikey
 
@@ -423,13 +423,13 @@ class ApiController(JSONRPCController):
 
                    'Error occurred locking repository `%s`' % repo.repo_name
 
                )
 

	
 
    def get_locks(self, apiuser, userid=Optional(OAttr('apiuser'))):
 
        """
 
        Get all repositories with locks for given userid, if
 
        this command is runned by non-admin account userid is set to user
 
        this command is run by non-admin account userid is set to user
 
        who is calling this method, thus returning locks for himself.
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
        :param userid: User to get locks for
 
        :type userid: Optional(str or int)
 
@@ -532,13 +532,13 @@ class ApiController(JSONRPCController):
 
          error :  null
 
        """
 
        return Setting.get_server_info()
 

	
 
    def get_user(self, apiuser, userid=Optional(OAttr('apiuser'))):
 
        """
 
        Get's an user by username or user_id, Returns empty result if user is
 
        Gets a user by username or user_id, Returns empty result if user is
 
        not found. If userid param is skipped it is set to id of user who is
 
        calling this method. This command can be executed only using api_key
 
        belonging to user with admin rights, or regular users that cannot
 
        specify different userid than theirs
 

	
 
        :param apiuser: filled automatically from apikey
 
@@ -556,13 +556,13 @@ class ApiController(JSONRPCController):
 
                        "api_keys":     "[<list of all api keys including additional ones>]"
 
                        "username" :    "<username>",
 
                        "firstname":    "<firstname>",
 
                        "lastname" :    "<lastname>",
 
                        "email" :       "<email>",
 
                        "emails":       "[<list of all emails including additional ones>]",
 
                        "ip_addresses": "[<ip_addresse_for_user>,...]",
 
                        "ip_addresses": "[<ip_address_for_user>,...]",
 
                        "active" :      "<bool: user active>",
 
                        "admin" :       "<bool: user is admin>",
 
                        "extern_name" : "<extern_name>",
 
                        "extern_type" : "<extern type>
 
                        "last_login":   "<last_login>",
 
                        "permissions": {
 
@@ -1510,13 +1510,13 @@ class ApiController(JSONRPCController):
 
            if isinstance(task, BaseAsyncResult):
 
                task_id = task.task_id
 
            # no commit, it's done in RepoModel, or async via celery
 
            return dict(
 
                msg="Created new repository `%s`" % (repo_name,),
 
                success=True,  # cannot return the repo data here since fork
 
                               # cann be done async
 
                               # can be done async
 
                task=task_id
 
            )
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            raise JSONRPCError(
 
                'failed to create repository `%s`' % (repo_name,))
 
@@ -1590,13 +1590,13 @@ class ApiController(JSONRPCController):
 
    def fork_repo(self, apiuser, repoid, fork_name,
 
                  owner=Optional(OAttr('apiuser')),
 
                  description=Optional(''), copy_permissions=Optional(False),
 
                  private=Optional(False), landing_rev=Optional('rev:tip')):
 
        """
 
        Creates a fork of given repo. In case of using celery this will
 
        immidiatelly return success message, while fork is going to be created
 
        immediately return success message, while fork is going to be created
 
        asynchronous. This command can be executed only using api_key belonging to
 
        user with admin rights or regular user that have fork permission, and at least
 
        read access to forking repository. Regular users cannot specify owner parameter.
 

	
 
        :param apiuser: filled automatically from apikey
 
        :type apiuser: AuthUser
 
@@ -1684,13 +1684,13 @@ class ApiController(JSONRPCController):
 
            if isinstance(task, BaseAsyncResult):
 
                task_id = task.task_id
 
            return dict(
 
                msg='Created fork of `%s` as `%s`' % (repo.repo_name,
 
                                                      fork_name),
 
                success=True,  # cannot return the repo data here since fork
 
                               # cann be done async
 
                               # can be done async
 
                task=task_id
 
            )
 
        except Exception:
 
            log.error(traceback.format_exc())
 
            raise JSONRPCError(
 
                'failed to fork repository `%s` as `%s`' % (repo_name,
kallithea/controllers/changeset.py
Show inline comments
 
@@ -12,13 +12,13 @@
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
kallithea.controllers.changeset
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
changeset controller for pylons showoing changes beetween
 
changeset controller for pylons showing changes between
 
revisions
 

	
 
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 25, 2010
 
:author: marcink
kallithea/controllers/files.py
Show inline comments
 
@@ -580,13 +580,13 @@ class FilesController(BaseRepoController
 
                data = stream.read(16 * 1024)
 
                if not data:
 
                    stream.close()
 
                    if fd:  # fd means we used temporary file
 
                        os.close(fd)
 
                    if not archive_cache_enabled:
 
                        log.debug('Destroing temp archive %s' % archive)
 
                        log.debug('Destroying temp archive %s' % archive)
 
                        os.remove(archive)
 
                    break
 
                yield data
 
        # store download action
 
        action_logger(user=c.authuser,
 
                      action='user_downloaded_archive:%s' % (archive_name),
kallithea/controllers/pullrequests.py
Show inline comments
 
@@ -568,13 +568,13 @@ class PullrequestsController(BaseRepoCon
 
                try:
 
                    c.a_branch_name = other_scm_instance.get_changeset(c.a_ref_name).branch # use ref_type ?
 
                except EmptyRepositoryError:
 
                    c.a_branch_name = 'null' # not a branch name ... but close enough
 
            # candidates: descendants of old head that are on the right branch
 
            #             and not are the old head itself ...
 
            #             and nothing at all if old head is a descendent of target ref name
 
            #             and nothing at all if old head is a descendant of target ref name
 
            if other_scm_instance._repo.revs('present(%s)::&%s', c.cs_ranges[-1].raw_id, c.a_branch_name):
 
                c.update_msg = _('This pull request has already been merged to %s.') % c.a_branch_name
 
            elif c.pull_request.is_closed():
 
                c.update_msg = _('This pull request has been closed and can not be updated.')
 
            else: # look for descendants of PR head on source branch in org repo
 
                avail_revs = org_scm_instance._repo.revs('%s:: & branch(%s)',
0 comments (0 inline, 0 general)