Changeset - b6b6955981a5
docs/api/models.rst
Show inline comments
 
@@ -13,9 +13,6 @@ The :mod:`models` module
 
.. automodule:: kallithea.model.permission
 
   :members:
 

	
 
.. automodule:: kallithea.model.repo_permission
 
   :members:
 

	
 
.. automodule:: kallithea.model.repo
 
   :members:
 

	
kallithea/controllers/admin/repo_groups.py
Show inline comments
 
@@ -101,7 +101,6 @@ class RepoGroupsController(BaseControlle
 
        _list = RepoGroup.query(sorted=True).all()
 
        group_iter = RepoGroupList(_list, perm_level='admin')
 
        repo_groups_data = []
 
        total_records = len(group_iter)
 
        _tmpl_lookup = app_globals.mako_lookup
 
        template = _tmpl_lookup.get_template('data_table/_dt_elements.html')
 

	
kallithea/controllers/admin/user_groups.py
Show inline comments
 
@@ -86,7 +86,6 @@ class UserGroupsController(BaseControlle
 
                        .all()
 
        group_iter = UserGroupList(_list, perm_level='admin')
 
        user_groups_data = []
 
        total_records = len(group_iter)
 
        _tmpl_lookup = app_globals.mako_lookup
 
        template = _tmpl_lookup.get_template('data_table/_dt_elements.html')
 

	
kallithea/controllers/admin/users.py
Show inline comments
 
@@ -70,7 +70,6 @@ class UsersController(BaseController):
 
                        .all()
 

	
 
        users_data = []
 
        total_records = len(c.users_list)
 
        _tmpl_lookup = app_globals.mako_lookup
 
        template = _tmpl_lookup.get_template('data_table/_dt_elements.html')
 

	
kallithea/controllers/changeset.py
Show inline comments
 
@@ -215,7 +215,6 @@ def create_cs_pr_comment(repo_name, revi
 
            return {
 
               'location': h.url('my_pullrequests'), # or repo pr list?
 
            }
 
            raise HTTPFound(location=h.url('my_pullrequests')) # or repo pr list?
 
        raise HTTPForbidden()
 

	
 
    text = request.POST.get('text', '').strip()
kallithea/lib/db_manage.py
Show inline comments
 
@@ -54,7 +54,6 @@ class DbManage(object):
 
        self.tests = tests
 
        self.root = root
 
        self.dburi = dbconf
 
        self.db_exists = False
 
        self.cli_args = cli_args or {}
 
        self.init_db(SESSION=SESSION)
 

	
kallithea/lib/exceptions.py
Show inline comments
 
@@ -74,9 +74,5 @@ class UserCreationError(Exception):
 
    pass
 

	
 

	
 
class RepositoryCreationError(Exception):
 
    pass
 

	
 

	
 
class HgsubversionImportError(Exception):
 
    pass
kallithea/lib/middleware/sessionmiddleware.py
Show inline comments
 
deleted file
kallithea/lib/rcmail/message.py
Show inline comments
 
@@ -2,35 +2,6 @@ from kallithea.lib.rcmail.exceptions imp
 
from kallithea.lib.rcmail.response import MailResponse
 

	
 

	
 
class Attachment(object):
 
    """
 
    Encapsulates file attachment information.
 

	
 
    :param filename: filename of attachment
 
    :param content_type: file mimetype
 
    :param data: the raw file data, either as string or file obj
 
    :param disposition: content-disposition (if any)
 
    """
 

	
 
    def __init__(self,
 
                 filename=None,
 
                 content_type=None,
 
                 data=None,
 
                 disposition=None):
 

	
 
        self.filename = filename
 
        self.content_type = content_type
 
        self.disposition = disposition or 'attachment'
 
        self._data = data
 

	
 
    @property
 
    def data(self):
 
        if isinstance(self._data, str):
 
            return self._data
 
        self._data = self._data.read()
 
        return self._data
 

	
 

	
 
class Message(object):
 
    """
 
    Encapsulates an email message.
kallithea/lib/rcmail/response.py
Show inline comments
 
@@ -392,7 +392,7 @@ class MIMEPart(MIMEBase):
 
        if mail.body is None:
 
            return  # only None, '' is still ok
 

	
 
        ctype, ctype_params = mail.content_encoding['Content-Type']
 
        ctype, _ctype_params = mail.content_encoding['Content-Type']
 
        cdisp, cdisp_params = mail.content_encoding['Content-Disposition']
 

	
 
        assert ctype, ("Extract payload requires that mail.content_encoding "
kallithea/lib/vcs/backends/base.py
Show inline comments
 
@@ -258,8 +258,6 @@ class BaseRepository(object):
 
        """
 
        Persists current changes made on this repository and returns newly
 
        created changeset.
 

	
 
        :raises ``NothingChangedError``: if no changes has been made
 
        """
 
        raise NotImplementedError
 

	
kallithea/lib/vcs/exceptions.py
Show inline comments
 
@@ -30,10 +30,6 @@ class TagDoesNotExistError(RepositoryErr
 
    pass
 

	
 

	
 
class BranchAlreadyExistError(RepositoryError):
 
    pass
 

	
 

	
 
class BranchDoesNotExistError(RepositoryError):
 
    pass
 

	
 
@@ -50,10 +46,6 @@ class CommitError(RepositoryError):
 
    pass
 

	
 

	
 
class NothingChangedError(CommitError):
 
    pass
 

	
 

	
 
class NodeError(VCSError):
 
    pass
 

	
 
@@ -88,7 +80,3 @@ class NodeAlreadyRemovedError(CommitErro
 

	
 
class ImproperArchiveTypeError(VCSError):
 
    pass
 

	
 

	
 
class CommandError(VCSError):
 
    pass
kallithea/lib/vcs/subprocessio.py
Show inline comments
 
@@ -221,17 +221,6 @@ class BufferedGenerator(object):
 
        return not self.worker.keep_reading.is_set()
 

	
 
    @property
 
    def done_reading_event(self):
 
        """
 
        Done_reading does not mean that the iterator's buffer is empty.
 
        Iterator might have done reading from underlying source, but the read
 
        chunks might still be available for serving through .next() method.
 

	
 
        :returns: An threading.Event class instance.
 
        """
 
        return self.worker.EOF
 

	
 
    @property
 
    def done_reading(self):
 
        """
 
        Done_reading does not mean that the iterator's buffer is empty.
kallithea/lib/vcs/utils/lazy.py
Show inline comments
 
import threading
 

	
 

	
 
class _Missing(object):
 

	
 
    def __repr__(self):
 
@@ -44,21 +41,3 @@ class LazyProperty(object):
 
            value = self._func(obj)
 
            obj.__dict__[self.__name__] = value
 
        return value
 

	
 

	
 
class ThreadLocalLazyProperty(LazyProperty):
 
    """
 
    Same as above but uses thread local dict for cache storage.
 
    """
 

	
 
    def __get__(self, obj, klass=None):
 
        if obj is None:
 
            return self
 
        if not hasattr(obj, '__tl_dict__'):
 
            obj.__tl_dict__ = threading.local().__dict__
 

	
 
        value = obj.__tl_dict__.get(self.__name__, _missing)
 
        if value is _missing:
 
            value = self._func(obj)
 
            obj.__tl_dict__[self.__name__] = value
 
        return value
kallithea/lib/vcs/utils/paths.py
Show inline comments
 
@@ -11,7 +11,7 @@ def get_dirs_for_path(*paths):
 
    for path in paths:
 
        head = path
 
        while head:
 
            head, tail = os.path.split(head)
 
            head, _tail = os.path.split(head)
 
            if head:
 
                yield head
 
            else:
kallithea/model/notification.py
Show inline comments
 
@@ -33,7 +33,6 @@ from tg import app_globals
 
from tg import tmpl_context as c
 
from tg.i18n import ugettext as _
 

	
 
import kallithea
 
from kallithea.lib import helpers as h
 
from kallithea.model.db import User
 

	
 
@@ -149,7 +148,6 @@ class EmailNotificationModel(object):
 

	
 
    def __init__(self):
 
        super(EmailNotificationModel, self).__init__()
 
        self._template_root = kallithea.CONFIG['paths']['templates'][0]
 
        self._tmpl_lookup = app_globals.mako_lookup
 
        self.email_types = {
 
            self.TYPE_CHANGESET_COMMENT: 'changeset_comment',
kallithea/model/repo_permission.py
Show inline comments
 
deleted file
kallithea/model/ssh_key.py
Show inline comments
 
@@ -52,7 +52,7 @@ class SshKeyModel(object):
 
        Will raise SshKeyModelException on errors
 
        """
 
        try:
 
            keytype, pub, comment = ssh.parse_pub_key(public_key)
 
            keytype, _pub, comment = ssh.parse_pub_key(public_key)
 
        except ssh.SshKeyParseError as e:
 
            raise SshKeyModelException(_('SSH key %r is invalid: %s') % (public_key, e.args[0]))
 
        if not description.strip():
kallithea/model/validators.py
Show inline comments
 
@@ -584,11 +584,11 @@ def ValidPerms(type_='repo'):
 
            for k, v, t in perms_new:
 
                try:
 
                    if t == 'user':
 
                        self.user_db = User.query() \
 
                        _user_db = User.query() \
 
                            .filter(User.active == True) \
 
                            .filter(User.username == k).one()
 
                    if t == 'users_group':
 
                        self.user_db = UserGroup.query() \
 
                        _user_db = UserGroup.query() \
 
                            .filter(UserGroup.users_group_active == True) \
 
                            .filter(UserGroup.users_group_name == k).one()
 

	
0 comments (0 inline, 0 general)