changeset 4526:1f94dd1e2757

Fix readability issues in comments
author Na'Tosha Bard <natosha@unity3d.com>
date Fri, 19 Sep 2014 10:54:51 +0200
parents 54df936a9bd3
children dacdea9fda2a
files kallithea/model/changeset_status.py kallithea/model/db.py kallithea/model/permission.py kallithea/model/repo.py kallithea/model/scm.py
diffstat 5 files changed, 16 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/model/changeset_status.py	Fri Sep 19 10:52:59 2014 +0200
+++ b/kallithea/model/changeset_status.py	Fri Sep 19 10:54:51 2014 +0200
@@ -129,7 +129,7 @@
                    pull_request=None, dont_allow_on_closed_pull_request=False):
         """
         Creates new status for changeset or updates the old ones bumping their
-        version, leaving the current status at
+        version, leaving the current status at the value of 'status'.
 
         :param repo:
         :param status:
--- a/kallithea/model/db.py	Fri Sep 19 10:52:59 2014 +0200
+++ b/kallithea/model/db.py	Fri Sep 19 10:54:51 2014 +0200
@@ -1074,7 +1074,7 @@
     @classmethod
     def base_path(cls):
         """
-        Returns base path when all repos are stored
+        Returns base path where all repos are stored
 
         :param cls:
         """
@@ -2466,7 +2466,7 @@
     @classmethod
     def base_path(cls):
         """
-        Returns base path when all gists are stored
+        Returns base path where all gists are stored
 
         :param cls:
         """
--- a/kallithea/model/permission.py	Fri Sep 19 10:52:59 2014 +0200
+++ b/kallithea/model/permission.py	Fri Sep 19 10:54:51 2014 +0200
@@ -59,8 +59,9 @@
 
     def create_default_permissions(self, user, force=False):
         """
-        Creates only missing default permissions for user, if force is set it
-        resets the default permissions for that user
+        Create missing default permissions for user. If force is set, the default
+        permissions for the user are reset, otherwise only missing permissions are
+        created.
 
         :param user:
         """
@@ -86,8 +87,8 @@
                 self.sa.delete(perm)
             self.sa.commit()
             defined_perms_groups = []
-        # for every default permission that needs to be created, we check if
-        # it's group is already defined, if it's not we create default perm
+        # For every default permission that needs to be created, we check if
+        # its group is already defined. If it's not, we create default permission.
         for perm_name in DEFAULT_PERMS:
             gr = _get_group(perm_name)
             if gr not in defined_perms_groups:
--- a/kallithea/model/repo.py	Fri Sep 19 10:52:59 2014 +0200
+++ b/kallithea/model/repo.py	Fri Sep 19 10:54:51 2014 +0200
@@ -379,8 +379,8 @@
                      enable_locking=False, enable_downloads=False,
                      copy_group_permissions=False, state=Repository.STATE_PENDING):
         """
-        Create repository inside database with PENDING state, this should be
-        only executed by create() repo. With exception of importing existing repos
+        Create repository inside database with PENDING state. This should only be
+        executed by create() repo, with exception of importing existing repos.
 
         """
         from kallithea.model.scm import ScmModel
@@ -681,9 +681,8 @@
     def _create_filesystem_repo(self, repo_name, repo_type, repo_group,
                                 clone_uri=None, repo_store_location=None):
         """
-        makes repository on filesystem. It's group aware means it'll create
-        a repository within a group, and alter the paths accordingly of
-        group location
+        Makes repository on filesystem. Operation is group aware, meaning that it will create
+        a repository within a group, and alter the paths accordingly to the group location.
 
         :param repo_name:
         :param alias:
--- a/kallithea/model/scm.py	Fri Sep 19 10:52:59 2014 +0200
+++ b/kallithea/model/scm.py	Fri Sep 19 10:54:51 2014 +0200
@@ -80,8 +80,7 @@
 
 class CachedRepoList(object):
     """
-    Cached repo list, uses in-memory cache after initialization, that is
-    super fast
+    Cached repo list. Uses super-fast in-memory cache after initialization.
     """
 
     def __init__(self, db_repo_list, repos_path, order_by=None, perm_set=None):
@@ -580,8 +579,7 @@
 
     def get_nodes(self, repo_name, revision, root_path='/', flat=True):
         """
-        recursive walk in root dir and return a set of all path in that dir
-        based on repository walk function
+        Recursively walk root dir and return a set of all paths found.
 
         :param repo_name: name of repository
         :param revision: revision for which to list nodes
@@ -611,7 +609,7 @@
     def create_nodes(self, user, repo, message, nodes, parent_cs=None,
                      author=None, trigger_push_hook=True):
         """
-        Commits given multiple nodes into repo
+        Commits specified nodes to repo.
 
         :param user: Kallithea User object or user_id, the commiter
         :param repo: Kallithea Repository object
@@ -736,7 +734,7 @@
     def delete_nodes(self, user, repo, message, nodes, parent_cs=None,
                      author=None, trigger_push_hook=True):
         """
-        Deletes given multiple nodes into repo
+        Deletes specified nodes from repo.
 
         :param user: Kallithea User object or user_id, the commiter
         :param repo: Kallithea Repository object