##// END OF EJS Templates
model: trivial typo fixes
Thomas De Schampheleire -
r4919:494b04a8 default
parent child Browse files
Show More
@@ -3,7 +3,7 b''
3 kallithea.model.changeset_status
3 kallithea.model.changeset_status
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
5
6 Changeset status conttroller
6 Changeset status controller
7
7
8 This file was forked by the Kallithea project in July 2014.
8 This file was forked by the Kallithea project in July 2014.
9 Original author and date, and relevant copyright and licensing information is below:
9 Original author and date, and relevant copyright and licensing information is below:
@@ -69,7 +69,7 b' log = logging.getLogger(__name__)'
69
69
70 class BaseModel(object):
70 class BaseModel(object):
71 """
71 """
72 Base Model for all classess
72 Base Model for all classes
73 """
73 """
74
74
75 @classmethod
75 @classmethod
@@ -97,7 +97,7 b' class BaseModel(object):'
97 return d
97 return d
98
98
99 def get_appstruct(self):
99 def get_appstruct(self):
100 """return list with keys and values tupples corresponding
100 """return list with keys and values tuples corresponding
101 to this model data """
101 to this model data """
102
102
103 l = []
103 l = []
@@ -1051,7 +1051,7 b' class Repository(Base, BaseModel):'
1051 def normalize_repo_name(cls, repo_name):
1051 def normalize_repo_name(cls, repo_name):
1052 """
1052 """
1053 Normalizes os specific repo_name to the format internally stored inside
1053 Normalizes os specific repo_name to the format internally stored inside
1054 dabatabase using URL_SEP
1054 database using URL_SEP
1055
1055
1056 :param cls:
1056 :param cls:
1057 :param repo_name:
1057 :param repo_name:
@@ -1540,7 +1540,7 b' class RepoGroup(Base, BaseModel):'
1540 if gr is None:
1540 if gr is None:
1541 break
1541 break
1542 if cnt == parents_recursion_limit:
1542 if cnt == parents_recursion_limit:
1543 # this will prevent accidental infinit loops
1543 # this will prevent accidental infinite loops
1544 log.error(('more than %s parents found for group %s, stopping '
1544 log.error(('more than %s parents found for group %s, stopping '
1545 'recursive parent fetching' % (parents_recursion_limit, self)))
1545 'recursive parent fetching' % (parents_recursion_limit, self)))
1546 break
1546 break
@@ -12,9 +12,9 b''
12 # You should have received a copy of the GNU General Public License
12 # You should have received a copy of the GNU General Public License
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
13 # along with this program. If not, see <http://www.gnu.org/licenses/>.
14 """
14 """
15 this is forms validation classes
15 these are form validation classes
16 http://formencode.org/module-formencode.validators.html
16 http://formencode.org/module-formencode.validators.html
17 for list off all availible validators
17 for list of all available validators
18
18
19 we can create our own validators
19 we can create our own validators
20
20
@@ -475,7 +475,7 b' class ScmModel(BaseModel):'
475
475
476 :param repo: SCM repo
476 :param repo: SCM repo
477 :param username: username who pushes
477 :param username: username who pushes
478 :param action: push/push_loca/push_remote
478 :param action: push/push_local/push_remote
479 :param repo_name: name of repo
479 :param repo_name: name of repo
480 :param revisions: list of revisions that we pushed
480 :param revisions: list of revisions that we pushed
481 """
481 """
@@ -611,15 +611,15 b' class ScmModel(BaseModel):'
611 """
611 """
612 Commits specified nodes to repo.
612 Commits specified nodes to repo.
613
613
614 :param user: Kallithea User object or user_id, the commiter
614 :param user: Kallithea User object or user_id, the committer
615 :param repo: Kallithea Repository object
615 :param repo: Kallithea Repository object
616 :param message: commit message
616 :param message: commit message
617 :param nodes: mapping {filename:{'content':content},...}
617 :param nodes: mapping {filename:{'content':content},...}
618 :param parent_cs: parent changeset, can be empty than it's initial commit
618 :param parent_cs: parent changeset, can be empty than it's initial commit
619 :param author: author of commit, cna be different that commiter only for git
619 :param author: author of commit, cna be different that committer only for git
620 :param trigger_push_hook: trigger push hooks
620 :param trigger_push_hook: trigger push hooks
621
621
622 :returns: new commited changeset
622 :returns: new committed changeset
623 """
623 """
624
624
625 user = self._get_user(user)
625 user = self._get_user(user)
@@ -643,8 +643,8 b' class ScmModel(BaseModel):'
643 processed_nodes.append((f_path, content))
643 processed_nodes.append((f_path, content))
644
644
645 message = safe_unicode(message)
645 message = safe_unicode(message)
646 commiter = user.full_contact
646 committer = user.full_contact
647 author = safe_unicode(author) if author else commiter
647 author = safe_unicode(author) if author else committer
648
648
649 IMC = self._get_IMC_module(scm_instance.alias)
649 IMC = self._get_IMC_module(scm_instance.alias)
650 imc = IMC(scm_instance)
650 imc = IMC(scm_instance)
@@ -681,8 +681,8 b' class ScmModel(BaseModel):'
681 scm_instance = repo.scm_instance_no_cache()
681 scm_instance = repo.scm_instance_no_cache()
682
682
683 message = safe_unicode(message)
683 message = safe_unicode(message)
684 commiter = user.full_contact
684 committer = user.full_contact
685 author = safe_unicode(author) if author else commiter
685 author = safe_unicode(author) if author else committer
686
686
687 imc_class = self._get_IMC_module(scm_instance.alias)
687 imc_class = self._get_IMC_module(scm_instance.alias)
688 imc = imc_class(scm_instance)
688 imc = imc_class(scm_instance)
@@ -736,15 +736,15 b' class ScmModel(BaseModel):'
736 """
736 """
737 Deletes specified nodes from repo.
737 Deletes specified nodes from repo.
738
738
739 :param user: Kallithea User object or user_id, the commiter
739 :param user: Kallithea User object or user_id, the committer
740 :param repo: Kallithea Repository object
740 :param repo: Kallithea Repository object
741 :param message: commit message
741 :param message: commit message
742 :param nodes: mapping {filename:{'content':content},...}
742 :param nodes: mapping {filename:{'content':content},...}
743 :param parent_cs: parent changeset, can be empty than it's initial commit
743 :param parent_cs: parent changeset, can be empty than it's initial commit
744 :param author: author of commit, cna be different that commiter only for git
744 :param author: author of commit, cna be different that committer only for git
745 :param trigger_push_hook: trigger push hooks
745 :param trigger_push_hook: trigger push hooks
746
746
747 :returns: new commited changeset after deletion
747 :returns: new committed changeset after deletion
748 """
748 """
749
749
750 user = self._get_user(user)
750 user = self._get_user(user)
@@ -759,8 +759,8 b' class ScmModel(BaseModel):'
759 processed_nodes.append((f_path, content))
759 processed_nodes.append((f_path, content))
760
760
761 message = safe_unicode(message)
761 message = safe_unicode(message)
762 commiter = user.full_contact
762 committer = user.full_contact
763 author = safe_unicode(author) if author else commiter
763 author = safe_unicode(author) if author else committer
764
764
765 IMC = self._get_IMC_module(scm_instance.alias)
765 IMC = self._get_IMC_module(scm_instance.alias)
766 imc = IMC(scm_instance)
766 imc = IMC(scm_instance)
@@ -335,7 +335,7 b' class UserModel(BaseModel):'
335 """
335 """
336 Fetches auth_user by user_id,or api_key if present.
336 Fetches auth_user by user_id,or api_key if present.
337 Fills auth_user attributes with those taken from database.
337 Fills auth_user attributes with those taken from database.
338 Additionally sets is_authenitated if lookup fails
338 Additionally sets is_authenticated if lookup fails
339 present in database
339 present in database
340
340
341 :param auth_user: instance of user to set attributes
341 :param auth_user: instance of user to set attributes
@@ -643,7 +643,7 b" def ValidPerms(type_='repo'):"
643 if member == User.DEFAULT_USER:
643 if member == User.DEFAULT_USER:
644 if str2bool(value.get('repo_private')):
644 if str2bool(value.get('repo_private')):
645 # set none for default when updating to
645 # set none for default when updating to
646 # private repo protects agains form manipulation
646 # private repo protects against form manipulation
647 v = EMPTY_PERM
647 v = EMPTY_PERM
648 perms_update.add((member, v, t))
648 perms_update.add((member, v, t))
649
649
General Comments 0
You need to be logged in to leave comments. Login now