Changeset - 395be5fa6eef
[Not reviewed]
kallithea/bin/rebranddb.py
Show inline comments
 
@@ -160,7 +160,6 @@ def main(argv):
 
        print '  where DBSTRING is the value of sqlalchemy.db1.url from the .ini,'
 
        print '  NEW defaults to "kallithea", OLD is by default detected from the db"'
 
        raise SystemExit(0)
 
    db = argv[1]
 
    new = 'kallithea'
 
    if len(argv) > 2:
 
        new = argv[2]
kallithea/controllers/admin/my_account.py
Show inline comments
 
@@ -248,8 +248,7 @@ class MyAccountController(BaseController
 
    def my_account_api_keys_add(self):
 
        lifetime = safe_int(request.POST.get('lifetime'), -1)
 
        description = request.POST.get('description')
 
        new_api_key = ApiKeyModel().create(self.authuser.user_id,
 
                                           description, lifetime)
 
        ApiKeyModel().create(self.authuser.user_id, description, lifetime)
 
        Session().commit()
 
        h.flash(_("Api key successfully created"), category='success')
 
        return redirect(url('my_account_api_keys'))
kallithea/controllers/admin/repo_groups.py
Show inline comments
 
@@ -331,7 +331,6 @@ class RepoGroupsController(BaseControlle
 
        c.group_repos = c.group.repositories.all()
 

	
 
        #overwrite our cached list with current filter
 
        gr_filter = c.group_repos
 
        c.repo_cnt = 0
 

	
 
        groups = RepoGroup.query().order_by(RepoGroup.group_name)\
kallithea/controllers/admin/users.py
Show inline comments
 
@@ -310,7 +310,7 @@ class UsersController(BaseController):
 

	
 
        lifetime = safe_int(request.POST.get('lifetime'), -1)
 
        description = request.POST.get('description')
 
        new_api_key = ApiKeyModel().create(c.user.user_id, description, lifetime)
 
        ApiKeyModel().create(c.user.user_id, description, lifetime)
 
        Session().commit()
 
        h.flash(_("Api key successfully created"), category='success')
 
        return redirect(url('edit_user_api_keys', id=c.user.user_id))
kallithea/controllers/files.py
Show inline comments
 
@@ -132,7 +132,7 @@ class FilesController(BaseRepoController
 
        # redirect to given revision from form if given
 
        post_revision = request.POST.get('at_rev', None)
 
        if post_revision:
 
            cs = self.__get_cs(post_revision)
 
            cs = self.__get_cs(post_revision) # FIXME - unused!
 

	
 
        c.revision = revision
 
        c.changeset = self.__get_cs(revision)
 
@@ -772,9 +772,8 @@ class FilesController(BaseRepoController
 
        changesets_group = ([], _("Changesets"))
 
        branches_group = ([], _("Branches"))
 
        tags_group = ([], _("Tags"))
 
        _hg = cs.repository.alias == 'hg'
 
        for chs in changesets:
 
            #_branch = '(%s)' % chs.branch if _hg else ''
 
            #_branch = '(%s)' % chs.branch if (cs.repository.alias == 'hg') else ''
 
            _branch = chs.branch
 
            n_desc = '%s (%s)' % (h.show_id(chs), _branch)
 
            changesets_group[0].append((chs.raw_id, n_desc,))
kallithea/controllers/pullrequests.py
Show inline comments
 
@@ -552,7 +552,7 @@ class PullrequestsController(BaseRepoCon
 
            return redirect(url('pullrequest_show', repo_name=repo_name,
 
                                pull_request_id=pull_request_id))
 

	
 
        comm = ChangesetCommentsModel().create(
 
        ChangesetCommentsModel().create(
 
            text=_('Closed, replaced by %s .') % url('pullrequest_show',
 
                                                   repo_name=old_pull_request.other_repo.repo_name,
 
                                                   pull_request_id=pull_request.pull_request_id,
kallithea/lib/celerylib/tasks.py
Show inline comments
 
@@ -74,7 +74,6 @@ def get_logger(cls):
 
@dbsession
 
def whoosh_index(repo_location, full_index):
 
    from kallithea.lib.indexers.daemon import WhooshIndexingDaemon
 
    log = get_logger(whoosh_index)
 
    DBS = get_session()
 

	
 
    index_location = config['index_dir']
 
@@ -263,7 +262,6 @@ def send_email(recipients, subject, body
 
    :param html_body: html version of body
 
    """
 
    log = get_logger(send_email)
 
    DBS = get_session()
 
    assert isinstance(recipients, list), recipients
 

	
 
    email_config = config
 
@@ -427,7 +425,7 @@ def create_repo_fork(form_data, cur_user
 
    try:
 
        fork_of = RepoModel(DBS)._get_repo(form_data.get('fork_parent_id'))
 

	
 
        fork_repo = RepoModel(DBS)._create_repo(
 
        RepoModel(DBS)._create_repo(
 
            repo_name=repo_name_full,
 
            repo_type=repo_type,
 
            description=form_data['description'],
 
@@ -443,7 +441,7 @@ def create_repo_fork(form_data, cur_user
 
                      fork_of.repo_name, '', DBS)
 
        DBS.commit()
 

	
 
        update_after_clone = form_data['update_after_clone']
 
        update_after_clone = form_data['update_after_clone'] # FIXME - unused!
 
        source_repo_path = os.path.join(base_path, fork_of.repo_name)
 

	
 
        # now create this repo on Filesystem
kallithea/lib/vcs/backends/git/changeset.py
Show inline comments
 
@@ -187,7 +187,7 @@ class GitChangeset(BaseChangeset):
 
        """
 
        Returns list of children changesets.
 
        """
 
        rev_filter = _git_path = settings.GIT_REV_FILTER
 
        rev_filter = settings.GIT_REV_FILTER
 
        so, se = self.repository.run_git_command(
 
            "rev-list %s --children" % (rev_filter)
 
        )
kallithea/lib/vcs/backends/git/repository.py
Show inline comments
 
@@ -260,7 +260,7 @@ class GitRepository(BaseRepository):
 
        except KeyError:
 
            return []
 

	
 
        rev_filter = _git_path = settings.GIT_REV_FILTER
 
        rev_filter = settings.GIT_REV_FILTER
 
        cmd = 'rev-list %s --reverse --date-order' % (rev_filter)
 
        try:
 
            so, se = self.run_git_command(cmd)
 
@@ -556,7 +556,7 @@ class GitRepository(BaseRepository):
 
            cmd_template += ' $branch_name'
 
            cmd_params['branch_name'] = branch_name
 
        else:
 
            rev_filter = _git_path = settings.GIT_REV_FILTER
 
            rev_filter = settings.GIT_REV_FILTER
 
            cmd_template += ' %s' % (rev_filter)
 

	
 
        cmd = string.Template(cmd_template).safe_substitute(**cmd_params)
kallithea/lib/vcs/backends/hg/repository.py
Show inline comments
 
@@ -337,7 +337,7 @@ class MercurialRepository(BaseRepository
 

	
 
        # now check if it's a proper hg repo
 
        try:
 
            repo_id = httppeer(repoui or ui.ui(), url).lookup('tip')
 
            httppeer(repoui or ui.ui(), url).lookup('tip')
 
        except Exception, e:
 
            raise urllib2.URLError(
 
                "url [%s] does not look like an hg repo org_exc: %s"
kallithea/model/repo.py
Show inline comments
 
@@ -553,7 +553,6 @@ class RepoModel(BaseModel):
 
                raise AttachedForksError()
 

	
 
            old_repo_dict = repo.get_dict()
 
            owner = repo.user
 
            try:
 
                self.sa.delete(repo)
 
                if fs_remove:
0 comments (0 inline, 0 general)