##// END OF EJS Templates
White space cleanup
marcink -
r2150:a8c9c009 beta
parent child Browse files
Show More
@@ -63,6 +63,7 b' class ChangesetCommentsModel(BaseModel):'
63 :param f_path:
63 :param f_path:
64 :param line_no:
64 :param line_no:
65 """
65 """
66
66 if text:
67 if text:
67 repo = Repository.get(repo_id)
68 repo = Repository.get(repo_id)
68 cs = repo.scm_instance.get_changeset(revision)
69 cs = repo.scm_instance.get_changeset(revision)
@@ -78,7 +79,6 b' class ChangesetCommentsModel(BaseModel):'
78
79
79 self.sa.add(comment)
80 self.sa.add(comment)
80 self.sa.flush()
81 self.sa.flush()
81
82 # make notification
82 # make notification
83 line = ''
83 line = ''
84 if line_no:
84 if line_no:
@@ -299,7 +299,7 b' class User(Base, BaseModel):'
299 user_followers = relationship('UserFollowing', primaryjoin='UserFollowing.follows_user_id==User.user_id', cascade='all')
299 user_followers = relationship('UserFollowing', primaryjoin='UserFollowing.follows_user_id==User.user_id', cascade='all')
300 repo_to_perm = relationship('UserRepoToPerm', primaryjoin='UserRepoToPerm.user_id==User.user_id', cascade='all')
300 repo_to_perm = relationship('UserRepoToPerm', primaryjoin='UserRepoToPerm.user_id==User.user_id', cascade='all')
301 repo_group_to_perm = relationship('UserRepoGroupToPerm', primaryjoin='UserRepoGroupToPerm.user_id==User.user_id', cascade='all')
301 repo_group_to_perm = relationship('UserRepoGroupToPerm', primaryjoin='UserRepoGroupToPerm.user_id==User.user_id', cascade='all')
302
302
303 group_member = relationship('UsersGroupMember', cascade='all')
303 group_member = relationship('UsersGroupMember', cascade='all')
304
304
305 notifications = relationship('UserNotification',)
305 notifications = relationship('UserNotification',)
@@ -967,7 +967,7 b' class UsersGroupToPerm(Base, BaseModel):'
967 __tablename__ = 'users_group_to_perm'
967 __tablename__ = 'users_group_to_perm'
968 __table_args__ = (
968 __table_args__ = (
969 UniqueConstraint('users_group_id', 'permission_id',),
969 UniqueConstraint('users_group_id', 'permission_id',),
970 {'extend_existing': True, 'mysql_engine':'InnoDB',
970 {'extend_existing': True, 'mysql_engine':'InnoDB',
971 'mysql_charset': 'utf8'}
971 'mysql_charset': 'utf8'}
972 )
972 )
973 users_group_to_perm_id = Column("users_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
973 users_group_to_perm_id = Column("users_group_to_perm_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
@@ -982,7 +982,7 b' class UserRepoGroupToPerm(Base, BaseMode'
982 __tablename__ = 'user_repo_group_to_perm'
982 __tablename__ = 'user_repo_group_to_perm'
983 __table_args__ = (
983 __table_args__ = (
984 UniqueConstraint('user_id', 'group_id', 'permission_id'),
984 UniqueConstraint('user_id', 'group_id', 'permission_id'),
985 {'extend_existing': True, 'mysql_engine':'InnoDB',
985 {'extend_existing': True, 'mysql_engine':'InnoDB',
986 'mysql_charset': 'utf8'}
986 'mysql_charset': 'utf8'}
987 )
987 )
988
988
@@ -1017,8 +1017,8 b' class UsersGroupRepoGroupToPerm(Base, Ba'
1017 class Statistics(Base, BaseModel):
1017 class Statistics(Base, BaseModel):
1018 __tablename__ = 'statistics'
1018 __tablename__ = 'statistics'
1019 __table_args__ = (
1019 __table_args__ = (
1020 UniqueConstraint('repository_id'),
1020 UniqueConstraint('repository_id'),
1021 {'extend_existing': True, 'mysql_engine':'InnoDB',
1021 {'extend_existing': True, 'mysql_engine':'InnoDB',
1022 'mysql_charset': 'utf8'}
1022 'mysql_charset': 'utf8'}
1023 )
1023 )
1024 stat_id = Column("stat_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
1024 stat_id = Column("stat_id", Integer(), nullable=False, unique=True, default=None, primary_key=True)
@@ -526,7 +526,7 b' class UserModel(BaseModel):'
526 .join((UsersGroupMember, UsersGroupRepoGroupToPerm.users_group_id == UsersGroupMember.users_group_id))\
526 .join((UsersGroupMember, UsersGroupRepoGroupToPerm.users_group_id == UsersGroupMember.users_group_id))\
527 .filter(UsersGroupMember.user_id == uid)\
527 .filter(UsersGroupMember.user_id == uid)\
528 .all()
528 .all()
529
529
530 for perm in user_repo_group_perms_from_users_groups:
530 for perm in user_repo_group_perms_from_users_groups:
531 g_k = perm.UsersGroupRepoGroupToPerm.group.group_name
531 g_k = perm.UsersGroupRepoGroupToPerm.group.group_name
532 print perm, g_k
532 print perm, g_k
@@ -122,7 +122,7 b' YUE.onDOMReady(function () {'
122 ${c.users_groups_array|n},
122 ${c.users_groups_array|n},
123 "${_('Group')}",
123 "${_('Group')}",
124 "${_('members')}"
124 "${_('members')}"
125 );
125 );
126 });
126 });
127
127
128 </script>
128 </script>
@@ -111,7 +111,7 b' YUE.onDOMReady(function () {'
111 ${c.users_groups_array|n},
111 ${c.users_groups_array|n},
112 "${_('Group')}",
112 "${_('Group')}",
113 "${_('members')}"
113 "${_('members')}"
114 );
114 );
115 });
115 });
116
116
117 </script>
117 </script>
@@ -13,7 +13,7 b''
13 <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span>
13 <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository',parent_group=c.group.group_id))}</span>
14 %else:
14 %else:
15 <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
15 <span>${h.link_to(_('ADD REPOSITORY'),h.url('admin_settings_create_repository'))}</span>
16 %endif
16 %endif
17 </li>
17 </li>
18 </ul>
18 </ul>
19 %endif
19 %endif
@@ -49,7 +49,7 b' class TestChangeSetCommentsController(Te'
49 notification = Notification.query().all()[0]
49 notification = Notification.query().all()[0]
50
50
51 ID = ChangesetComment.query().first().comment_id
51 ID = ChangesetComment.query().first().comment_id
52 self.assertEqual(notification.type_,
52 self.assertEqual(notification.type_,
53 Notification.TYPE_CHANGESET_COMMENT)
53 Notification.TYPE_CHANGESET_COMMENT)
54 sbj = (u'/vcs_test_hg/changeset/'
54 sbj = (u'/vcs_test_hg/changeset/'
55 '27cd5cce30c96924232dffcd24178a07ffeb5dfc#comment-%s' % ID)
55 '27cd5cce30c96924232dffcd24178a07ffeb5dfc#comment-%s' % ID)
@@ -86,7 +86,7 b' class TestChangeSetCommentsController(Te'
86
86
87 notification = Notification.query().all()[0]
87 notification = Notification.query().all()[0]
88 ID = ChangesetComment.query().first().comment_id
88 ID = ChangesetComment.query().first().comment_id
89 self.assertEqual(notification.type_,
89 self.assertEqual(notification.type_,
90 Notification.TYPE_CHANGESET_COMMENT)
90 Notification.TYPE_CHANGESET_COMMENT)
91 sbj = (u'/vcs_test_hg/changeset/'
91 sbj = (u'/vcs_test_hg/changeset/'
92 '27cd5cce30c96924232dffcd24178a07ffeb5dfc#comment-%s' % ID)
92 '27cd5cce30c96924232dffcd24178a07ffeb5dfc#comment-%s' % ID)
General Comments 0
You need to be logged in to leave comments. Login now