##// END OF EJS Templates
merged with stable
super-admin -
r4699:59f63a52 merge default
parent child
Show More
@@ -0,0 +1,40
1 |RCE| 4.25.1 |RNS|
2 ------------------
3
4 Release Date
5 ^^^^^^^^^^^^
6
7 - 2021-04-06
8
9
10 New Features
11 ^^^^^^^^^^^^
12
13
14
15 General
16 ^^^^^^^
17
18
19
20 Security
21 ^^^^^^^^
22
23
24
25 Performance
26 ^^^^^^^^^^^
27
28
29
30 Fixes
31 ^^^^^
32
33 - Artifacts: fixed admin panel bad urls generated for the new artifacts admin view in CE edition.
34
35
36
37 Upgrade notes
38 ^^^^^^^^^^^^^
39
40 - Un-scheduled release addressing problems in 4.25.X releases.
@@ -0,0 +1,53
1 |RCE| 4.25.2 |RNS|
2 ------------------
3
4 Release Date
5 ^^^^^^^^^^^^
6
7 - 2021-04-14
8
9
10 New Features
11 ^^^^^^^^^^^^
12
13
14
15 General
16 ^^^^^^^
17
18 - Comments: refresh on draft sidebar on draft submit.
19 - Vcsserver: log exceptions into the logs
20 - Archiving: make it explicit archiving a repo is irreversible.
21 - My-account: updated bookmarks UX
22 - Pull requests: added awaiting my review filter for users pull-requests.
23 Additionally the awaiting my review now properly filters pull requests that have no review votes on them.
24
25
26 Security
27 ^^^^^^^^
28
29
30
31 Performance
32 ^^^^^^^^^^^
33
34
35
36 Fixes
37 ^^^^^
38
39 - Draft comments: fixed logic in toggle all draft for submit.
40 - Draft comments: when submitting edited drafts also clear the history to prevent DB problems.
41 - Mercurial: fixed a case of lookup branches that had 40 characters in length.
42 - Gists: block id input for public gists.
43 - Pull requests: fixed problems with unicode characters in branches.
44 - Pull requests: small ui fix for grid.
45 - Summary: fixed ui on summary page for non-admins.
46 The setup instructions were broken if user had no write permissions.
47 - Users: make user data loading more resilient to errors.
48
49
50 Upgrade notes
51 ^^^^^^^^^^^^^
52
53 - Scheduled release addressing problems in 4.25.X releases.
@@ -0,0 +1,40
1 # -*- coding: utf-8 -*-
2
3 # Copyright (C) 2016-2020 RhodeCode GmbH
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License, version 3
7 # (only), as published by the Free Software Foundation.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 #
17 # This program is dual-licensed. If you wish to learn more about the
18 # RhodeCode Enterprise Edition, including its added features, Support services,
19 # and proprietary license terms, please see https://rhodecode.com/licenses/
20
21 import logging
22
23 from rhodecode.apps._base import BaseAppView, DataGridAppView
24 from rhodecode.lib.auth import LoginRequired, HasPermissionAllDecorator
25
26 log = logging.getLogger(__name__)
27
28
29 class AdminArtifactsView(BaseAppView, DataGridAppView):
30
31 def load_default_context(self):
32 c = self._get_local_tmpl_context()
33 return c
34
35 @LoginRequired()
36 @HasPermissionAllDecorator('hg.admin')
37 def artifacts(self):
38 c = self.load_default_context()
39 c.active = 'artifacts'
40 return self._get_template_context(c)
@@ -0,0 +1,39
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.mako"/>
3
4 <%def name="title()">
5 ${_('Artifacts Admin')}
6 %if c.rhodecode_name:
7 &middot; ${h.branding(c.rhodecode_name)}
8 %endif
9 </%def>
10
11 <%def name="breadcrumbs_links()"></%def>
12
13 <%def name="menu_bar_nav()">
14 ${self.menu_items(active='admin')}
15 </%def>
16
17 <%def name="menu_bar_subnav()">
18 ${self.admin_menu(active='artifacts')}
19 </%def>
20
21 <%def name="main()">
22
23 <div class="box">
24
25 <div class="panel panel-default">
26 <div class="panel-heading">
27 <h3 class="panel-title">${_('Artifacts Administration.')}</h3>
28 </div>
29 <div class="panel-body">
30 <h4>${_('This feature is available in RhodeCode EE edition only. Contact {sales_email} to obtain a trial license.').format(sales_email='<a href="mailto:sales@rhodecode.com">sales@rhodecode.com</a>')|n}</h4>
31
32 </div>
33 </div>
34
35 </div>
36
37
38 </%def>
39
@@ -1,5 +1,6
1 [bumpversion]
1 [bumpversion]
2 current_version = 4.25.0
2 current_version = 4.25.2
3 message = release: Bump version {current_version} to {new_version}
3 message = release: Bump version {current_version} to {new_version}
4
4
5 [bumpversion:file:rhodecode/VERSION]
5 [bumpversion:file:rhodecode/VERSION]
6
@@ -75,3 +75,6 56310d93b33b97535908ef9c7b0985b89bb7fad2
75 7637c38528fa38c1eabc1fde6a869c20995a0da7 v4.23.2
75 7637c38528fa38c1eabc1fde6a869c20995a0da7 v4.23.2
76 6aeb4ac3ef7f0ac699c914740dad3688c9495e83 v4.24.0
76 6aeb4ac3ef7f0ac699c914740dad3688c9495e83 v4.24.0
77 6eaf953da06e468a4c4e5239d3d0e700bda6b163 v4.24.1
77 6eaf953da06e468a4c4e5239d3d0e700bda6b163 v4.24.1
78 f8161cbc2d94a935d3c395a0e758d9a094287169 v4.25.0
79 77fe47b5b39338e71b2c040de2c0359b529b6251 v4.25.1
80 27475bd8a718b9a00a37a8563c4927120865ad85 v4.25.2
@@ -21,7 +21,7 done = true
21
21
22 [release]
22 [release]
23 state = prepared
23 state = prepared
24 version = 4.11.6
24 version = 4.25.2
25
25
26 [task:updated_translation]
26 [task:updated_translation]
27
27
@@ -9,6 +9,8 Release Notes
9 .. toctree::
9 .. toctree::
10 :maxdepth: 1
10 :maxdepth: 1
11
11
12 release-notes-4.25.2.rst
13 release-notes-4.25.1.rst
12 release-notes-4.25.0.rst
14 release-notes-4.25.0.rst
13 release-notes-4.24.1.rst
15 release-notes-4.24.1.rst
14 release-notes-4.24.0.rst
16 release-notes-4.24.0.rst
@@ -1883,7 +1883,7 self: super: {
1883 };
1883 };
1884 };
1884 };
1885 "rhodecode-enterprise-ce" = super.buildPythonPackage {
1885 "rhodecode-enterprise-ce" = super.buildPythonPackage {
1886 name = "rhodecode-enterprise-ce-4.25.0";
1886 name = "rhodecode-enterprise-ce-4.25.2";
1887 buildInputs = [
1887 buildInputs = [
1888 self."pytest"
1888 self."pytest"
1889 self."py"
1889 self."py"
@@ -1,1 +1,1
1 4.25.0 No newline at end of file
1 4.25.2 No newline at end of file
@@ -232,6 +232,9 def create_repo_group(
232 user=apiuser)
232 user=apiuser)
233
233
234 Session().commit()
234 Session().commit()
235
236 PermissionModel().trigger_permission_flush()
237
235 return {
238 return {
236 'msg': 'Created new repo group `%s`' % validated_group_name,
239 'msg': 'Created new repo group `%s`' % validated_group_name,
237 'repo_group': repo_group.get_api_data()
240 'repo_group': repo_group.get_api_data()
@@ -27,6 +27,7 def admin_routes(config):
27 Admin prefixed routes
27 Admin prefixed routes
28 """
28 """
29 from rhodecode.apps.admin.views.audit_logs import AdminAuditLogsView
29 from rhodecode.apps.admin.views.audit_logs import AdminAuditLogsView
30 from rhodecode.apps.admin.views.artifacts import AdminArtifactsView
30 from rhodecode.apps.admin.views.defaults import AdminDefaultSettingsView
31 from rhodecode.apps.admin.views.defaults import AdminDefaultSettingsView
31 from rhodecode.apps.admin.views.exception_tracker import ExceptionsTrackerView
32 from rhodecode.apps.admin.views.exception_tracker import ExceptionsTrackerView
32 from rhodecode.apps.admin.views.main_views import AdminMainView
33 from rhodecode.apps.admin.views.main_views import AdminMainView
@@ -60,6 +61,34 def admin_routes(config):
60 route_name='admin_audit_log_entry', request_method='GET',
61 route_name='admin_audit_log_entry', request_method='GET',
61 renderer='rhodecode:templates/admin/admin_audit_log_entry.mako')
62 renderer='rhodecode:templates/admin/admin_audit_log_entry.mako')
62
63
64 # Artifacts EE feature
65 config.add_route(
66 'admin_artifacts',
67 pattern=ADMIN_PREFIX + '/artifacts')
68 config.add_route(
69 'admin_artifacts_show_all',
70 pattern=ADMIN_PREFIX + '/artifacts')
71 config.add_view(
72 AdminArtifactsView,
73 attr='artifacts',
74 route_name='admin_artifacts', request_method='GET',
75 renderer='rhodecode:templates/admin/artifacts/artifacts.mako')
76 config.add_view(
77 AdminArtifactsView,
78 attr='artifacts',
79 route_name='admin_artifacts_show_all', request_method='GET',
80 renderer='rhodecode:templates/admin/artifacts/artifacts.mako')
81 # EE views
82 config.add_route(
83 name='admin_artifacts_show_info',
84 pattern=ADMIN_PREFIX + '/artifacts/{uid}')
85 config.add_route(
86 name='admin_artifacts_delete',
87 pattern=ADMIN_PREFIX + '/artifacts/{uid}/delete')
88 config.add_route(
89 name='admin_artifacts_update',
90 pattern=ADMIN_PREFIX + '/artifacts/{uid}/update')
91
63 config.add_route(
92 config.add_route(
64 name='admin_settings_open_source',
93 name='admin_settings_open_source',
65 pattern='/settings/open_source')
94 pattern='/settings/open_source')
@@ -349,13 +349,7 class AdminRepoGroupsView(BaseAppView, D
349 % repo_group_name, category='error')
349 % repo_group_name, category='error')
350 raise HTTPFound(h.route_path('home'))
350 raise HTTPFound(h.route_path('home'))
351
351
352 affected_user_ids = [self._rhodecode_user.user_id]
352 PermissionModel().trigger_permission_flush()
353 if copy_permissions:
354 user_group_perms = repo_group.permissions(expand_from_user_groups=True)
355 copy_perms = [perm['user_id'] for perm in user_group_perms]
356 # also include those newly created by copy
357 affected_user_ids.extend(copy_perms)
358 PermissionModel().trigger_permission_flush(affected_user_ids)
359
353
360 raise HTTPFound(
354 raise HTTPFound(
361 h.route_path('repo_group_home',
355 h.route_path('repo_group_home',
@@ -242,11 +242,7 class AdminReposView(BaseAppView, DataGr
242
242
243 repo_name = form_result.get('repo_name_full')
243 repo_name = form_result.get('repo_name_full')
244
244
245 affected_user_ids = [self._rhodecode_user.user_id]
245 PermissionModel().trigger_permission_flush()
246 if copy_permissions:
247 # permission flush is done in repo creating
248 pass
249 PermissionModel().trigger_permission_flush(affected_user_ids)
250
246
251 raise HTTPFound(
247 raise HTTPFound(
252 h.route_path('repo_creating', repo_name=repo_name,
248 h.route_path('repo_creating', repo_name=repo_name,
@@ -76,7 +76,11 class TestMyAccountEdit(TestController):
76 'requests requiring your participation.')
76 'requests requiring your participation.')
77
77
78 @pytest.mark.backends("git", "hg")
78 @pytest.mark.backends("git", "hg")
79 def test_my_account_my_pullrequests_data(self, pr_util, xhr_header):
79 @pytest.mark.parametrize('params, expected_title', [
80 ({'closed': 1}, 'Closed'),
81 ({'awaiting_my_review': 1}, 'Awaiting my review'),
82 ])
83 def test_my_account_my_pullrequests_data(self, pr_util, xhr_header, params, expected_title):
80 self.log_user()
84 self.log_user()
81 response = self.app.get(route_path('my_account_pullrequests_data'),
85 response = self.app.get(route_path('my_account_pullrequests_data'),
82 extra_environ=xhr_header)
86 extra_environ=xhr_header)
@@ -43,7 +43,7 from rhodecode.model.comment import Comm
43 from rhodecode.model.db import (
43 from rhodecode.model.db import (
44 IntegrityError, or_, in_filter_generator,
44 IntegrityError, or_, in_filter_generator,
45 Repository, UserEmailMap, UserApiKeys, UserFollowing,
45 Repository, UserEmailMap, UserApiKeys, UserFollowing,
46 PullRequest, UserBookmark, RepoGroup)
46 PullRequest, UserBookmark, RepoGroup, ChangesetStatus)
47 from rhodecode.model.meta import Session
47 from rhodecode.model.meta import Session
48 from rhodecode.model.pull_request import PullRequestModel
48 from rhodecode.model.pull_request import PullRequestModel
49 from rhodecode.model.user import UserModel
49 from rhodecode.model.user import UserModel
@@ -654,21 +654,31 class MyAccountView(BaseAppView, DataGri
654 Session().commit()
654 Session().commit()
655 return user.user_data['notification_status']
655 return user.user_data['notification_status']
656
656
657 def _get_pull_requests_list(self, statuses):
657 def _get_pull_requests_list(self, statuses, filter_type=None):
658 draw, start, limit = self._extract_chunk(self.request)
658 draw, start, limit = self._extract_chunk(self.request)
659 search_q, order_by, order_dir = self._extract_ordering(self.request)
659 search_q, order_by, order_dir = self._extract_ordering(self.request)
660
660
661 _render = self.request.get_partial_renderer(
661 _render = self.request.get_partial_renderer(
662 'rhodecode:templates/data_table/_dt_elements.mako')
662 'rhodecode:templates/data_table/_dt_elements.mako')
663
663
664 pull_requests = PullRequestModel().get_im_participating_in(
664 if filter_type == 'awaiting_my_review':
665 user_id=self._rhodecode_user.user_id,
665 pull_requests = PullRequestModel().get_im_participating_in_for_review(
666 statuses=statuses, query=search_q,
666 user_id=self._rhodecode_user.user_id,
667 offset=start, length=limit, order_by=order_by,
667 statuses=statuses, query=search_q,
668 order_dir=order_dir)
668 offset=start, length=limit, order_by=order_by,
669 order_dir=order_dir)
669
670
670 pull_requests_total_count = PullRequestModel().count_im_participating_in(
671 pull_requests_total_count = PullRequestModel().count_im_participating_in_for_review(
671 user_id=self._rhodecode_user.user_id, statuses=statuses, query=search_q)
672 user_id=self._rhodecode_user.user_id, statuses=statuses, query=search_q)
673 else:
674 pull_requests = PullRequestModel().get_im_participating_in(
675 user_id=self._rhodecode_user.user_id,
676 statuses=statuses, query=search_q,
677 offset=start, length=limit, order_by=order_by,
678 order_dir=order_dir)
679
680 pull_requests_total_count = PullRequestModel().count_im_participating_in(
681 user_id=self._rhodecode_user.user_id, statuses=statuses, query=search_q)
672
682
673 data = []
683 data = []
674 comments_model = CommentsModel()
684 comments_model = CommentsModel()
@@ -678,6 +688,12 class MyAccountView(BaseAppView, DataGri
678 repo_id, pull_request=pr, include_drafts=False, count_only=True)
688 repo_id, pull_request=pr, include_drafts=False, count_only=True)
679 owned = pr.user_id == self._rhodecode_user.user_id
689 owned = pr.user_id == self._rhodecode_user.user_id
680
690
691 review_statuses = pr.reviewers_statuses(user=self._rhodecode_db_user)
692 my_review_status = ChangesetStatus.STATUS_NOT_REVIEWED
693 if review_statuses and review_statuses[4]:
694 _review_obj, _user, _reasons, _mandatory, statuses = review_statuses
695 my_review_status = statuses[0][1].status
696
681 data.append({
697 data.append({
682 'target_repo': _render('pullrequest_target_repo',
698 'target_repo': _render('pullrequest_target_repo',
683 pr.target_repo.repo_name),
699 pr.target_repo.repo_name),
@@ -688,6 +704,8 class MyAccountView(BaseAppView, DataGri
688 'name_raw': pr.pull_request_id,
704 'name_raw': pr.pull_request_id,
689 'status': _render('pullrequest_status',
705 'status': _render('pullrequest_status',
690 pr.calculated_review_status()),
706 pr.calculated_review_status()),
707 'my_status': _render('pullrequest_status',
708 my_review_status),
691 'title': _render('pullrequest_title', pr.title, pr.description),
709 'title': _render('pullrequest_title', pr.title, pr.description),
692 'description': h.escape(pr.description),
710 'description': h.escape(pr.description),
693 'updated_on': _render('pullrequest_updated_on',
711 'updated_on': _render('pullrequest_updated_on',
@@ -723,7 +741,14 class MyAccountView(BaseAppView, DataGri
723 c.active = 'pullrequests'
741 c.active = 'pullrequests'
724 req_get = self.request.GET
742 req_get = self.request.GET
725
743
726 c.closed = str2bool(req_get.get('pr_show_closed'))
744 c.closed = str2bool(req_get.get('closed'))
745 c.awaiting_my_review = str2bool(req_get.get('awaiting_my_review'))
746
747 c.selected_filter = 'all'
748 if c.closed:
749 c.selected_filter = 'all_closed'
750 if c.awaiting_my_review:
751 c.selected_filter = 'awaiting_my_review'
727
752
728 return self._get_template_context(c)
753 return self._get_template_context(c)
729
754
@@ -732,13 +757,19 class MyAccountView(BaseAppView, DataGri
732 def my_account_pullrequests_data(self):
757 def my_account_pullrequests_data(self):
733 self.load_default_context()
758 self.load_default_context()
734 req_get = self.request.GET
759 req_get = self.request.GET
760
761 awaiting_my_review = str2bool(req_get.get('awaiting_my_review'))
735 closed = str2bool(req_get.get('closed'))
762 closed = str2bool(req_get.get('closed'))
736
763
737 statuses = [PullRequest.STATUS_NEW, PullRequest.STATUS_OPEN]
764 statuses = [PullRequest.STATUS_NEW, PullRequest.STATUS_OPEN]
738 if closed:
765 if closed:
739 statuses += [PullRequest.STATUS_CLOSED]
766 statuses += [PullRequest.STATUS_CLOSED]
740
767
741 data = self._get_pull_requests_list(statuses=statuses)
768 filter_type = \
769 'awaiting_my_review' if awaiting_my_review \
770 else None
771
772 data = self._get_pull_requests_list(statuses=statuses, filter_type=filter_type)
742 return data
773 return data
743
774
744 @LoginRequired()
775 @LoginRequired()
@@ -41,7 +41,7 class TestPullRequestList(object):
41
41
42 @pytest.mark.parametrize('params, expected_title', [
42 @pytest.mark.parametrize('params, expected_title', [
43 ({'source': 0, 'closed': 1}, 'Closed'),
43 ({'source': 0, 'closed': 1}, 'Closed'),
44 ({'source': 0, 'my': 1}, 'Opened by me'),
44 ({'source': 0, 'my': 1}, 'Created by me'),
45 ({'source': 0, 'awaiting_review': 1}, 'Awaiting review'),
45 ({'source': 0, 'awaiting_review': 1}, 'Awaiting review'),
46 ({'source': 0, 'awaiting_my_review': 1}, 'Awaiting my review'),
46 ({'source': 0, 'awaiting_my_review': 1}, 'Awaiting my review'),
47 ({'source': 1}, 'From this repo'),
47 ({'source': 1}, 'From this repo'),
@@ -539,8 +539,14 class RepoCommitsView(RepoAppView):
539 @CSRFRequired()
539 @CSRFRequired()
540 def repo_commit_comment_history_view(self):
540 def repo_commit_comment_history_view(self):
541 c = self.load_default_context()
541 c = self.load_default_context()
542 comment_history_id = self.request.matchdict['comment_history_id']
542
543
543 comment_history_id = self.request.matchdict['comment_history_id']
544 comment = ChangesetComment.get_or_404(comment_history_id)
545 comment_owner = (comment.author.user_id == self._rhodecode_db_user.user_id)
546 if comment.draft and not comment_owner:
547 # if we see draft comments history, we only allow this for owner
548 raise HTTPNotFound()
549
544 comment_history = ChangesetCommentHistory.get_or_404(comment_history_id)
550 comment_history = ChangesetCommentHistory.get_or_404(comment_history_id)
545 is_repo_comment = comment_history.comment.repo.repo_id == self.db_repo.repo_id
551 is_repo_comment = comment_history.comment.repo.repo_id == self.db_repo.repo_id
546
552
@@ -549,8 +555,7 class RepoCommitsView(RepoAppView):
549
555
550 rendered_comment = render(
556 rendered_comment = render(
551 'rhodecode:templates/changeset/comment_history.mako',
557 'rhodecode:templates/changeset/comment_history.mako',
552 self._get_template_context(c)
558 self._get_template_context(c), self.request)
553 , self.request)
554 return rendered_comment
559 return rendered_comment
555 else:
560 else:
556 log.warning('No permissions for user %s to show comment_history_id: %s',
561 log.warning('No permissions for user %s to show comment_history_id: %s',
@@ -39,7 +39,7 from rhodecode.lib.ext_json import json
39 from rhodecode.lib.auth import (
39 from rhodecode.lib.auth import (
40 LoginRequired, HasRepoPermissionAny, HasRepoPermissionAnyDecorator,
40 LoginRequired, HasRepoPermissionAny, HasRepoPermissionAnyDecorator,
41 NotAnonymous, CSRFRequired)
41 NotAnonymous, CSRFRequired)
42 from rhodecode.lib.utils2 import str2bool, safe_str, safe_unicode, safe_int, aslist
42 from rhodecode.lib.utils2 import str2bool, safe_str, safe_unicode, safe_int, aslist, retry
43 from rhodecode.lib.vcs.backends.base import (
43 from rhodecode.lib.vcs.backends.base import (
44 EmptyCommit, UpdateFailureReason, unicode_to_reference)
44 EmptyCommit, UpdateFailureReason, unicode_to_reference)
45 from rhodecode.lib.vcs.exceptions import (
45 from rhodecode.lib.vcs.exceptions import (
@@ -79,21 +79,20 class RepoPullRequestsView(RepoAppView,
79
79
80 if filter_type == 'awaiting_review':
80 if filter_type == 'awaiting_review':
81 pull_requests = PullRequestModel().get_awaiting_review(
81 pull_requests = PullRequestModel().get_awaiting_review(
82 repo_name, search_q=search_q, source=source, opened_by=opened_by,
82 repo_name,
83 statuses=statuses, offset=start, length=limit,
83 search_q=search_q, statuses=statuses,
84 order_by=order_by, order_dir=order_dir)
84 offset=start, length=limit, order_by=order_by, order_dir=order_dir)
85 pull_requests_total_count = PullRequestModel().count_awaiting_review(
85 pull_requests_total_count = PullRequestModel().count_awaiting_review(
86 repo_name, search_q=search_q, source=source, statuses=statuses,
86 repo_name,
87 opened_by=opened_by)
87 search_q=search_q, statuses=statuses)
88 elif filter_type == 'awaiting_my_review':
88 elif filter_type == 'awaiting_my_review':
89 pull_requests = PullRequestModel().get_awaiting_my_review(
89 pull_requests = PullRequestModel().get_awaiting_my_review(
90 repo_name, search_q=search_q, source=source, opened_by=opened_by,
90 repo_name, self._rhodecode_user.user_id,
91 user_id=self._rhodecode_user.user_id, statuses=statuses,
91 search_q=search_q, statuses=statuses,
92 offset=start, length=limit, order_by=order_by,
92 offset=start, length=limit, order_by=order_by, order_dir=order_dir)
93 order_dir=order_dir)
94 pull_requests_total_count = PullRequestModel().count_awaiting_my_review(
93 pull_requests_total_count = PullRequestModel().count_awaiting_my_review(
95 repo_name, search_q=search_q, source=source, user_id=self._rhodecode_user.user_id,
94 repo_name, self._rhodecode_user.user_id,
96 statuses=statuses, opened_by=opened_by)
95 search_q=search_q, statuses=statuses)
97 else:
96 else:
98 pull_requests = PullRequestModel().get_all(
97 pull_requests = PullRequestModel().get_all(
99 repo_name, search_q=search_q, source=source, opened_by=opened_by,
98 repo_name, search_q=search_q, source=source, opened_by=opened_by,
@@ -110,6 +109,12 class RepoPullRequestsView(RepoAppView,
110 self.db_repo.repo_id, pull_request=pr,
109 self.db_repo.repo_id, pull_request=pr,
111 include_drafts=False, count_only=True)
110 include_drafts=False, count_only=True)
112
111
112 review_statuses = pr.reviewers_statuses(user=self._rhodecode_db_user)
113 my_review_status = ChangesetStatus.STATUS_NOT_REVIEWED
114 if review_statuses and review_statuses[4]:
115 _review_obj, _user, _reasons, _mandatory, statuses = review_statuses
116 my_review_status = statuses[0][1].status
117
113 data.append({
118 data.append({
114 'name': _render('pullrequest_name',
119 'name': _render('pullrequest_name',
115 pr.pull_request_id, pr.pull_request_state,
120 pr.pull_request_id, pr.pull_request_state,
@@ -118,6 +123,8 class RepoPullRequestsView(RepoAppView,
118 'name_raw': pr.pull_request_id,
123 'name_raw': pr.pull_request_id,
119 'status': _render('pullrequest_status',
124 'status': _render('pullrequest_status',
120 pr.calculated_review_status()),
125 pr.calculated_review_status()),
126 'my_status': _render('pullrequest_status',
127 my_review_status),
121 'title': _render('pullrequest_title', pr.title, pr.description),
128 'title': _render('pullrequest_title', pr.title, pr.description),
122 'description': h.escape(pr.description),
129 'description': h.escape(pr.description),
123 'updated_on': _render('pullrequest_updated_on',
130 'updated_on': _render('pullrequest_updated_on',
@@ -1346,9 +1353,13 class RepoPullRequestsView(RepoAppView,
1346 def _update_commits(self, c, pull_request):
1353 def _update_commits(self, c, pull_request):
1347 _ = self.request.translate
1354 _ = self.request.translate
1348
1355
1356 @retry(exception=Exception, n_tries=3)
1357 def commits_update():
1358 return PullRequestModel().update_commits(
1359 pull_request, self._rhodecode_db_user)
1360
1349 with pull_request.set_state(PullRequest.STATE_UPDATING):
1361 with pull_request.set_state(PullRequest.STATE_UPDATING):
1350 resp = PullRequestModel().update_commits(
1362 resp = commits_update() # retry x3
1351 pull_request, self._rhodecode_db_user)
1352
1363
1353 if resp.executed:
1364 if resp.executed:
1354
1365
This diff has been collapsed as it changes many lines, (635 lines changed) Show them Hide them
@@ -6,9 +6,9
6 #, fuzzy
6 #, fuzzy
7 msgid ""
7 msgid ""
8 msgstr ""
8 msgstr ""
9 "Project-Id-Version: rhodecode-enterprise-ce 4.24.0\n"
9 "Project-Id-Version: rhodecode-enterprise-ce 4.25.0\n"
10 "Report-Msgid-Bugs-To: marcin@rhodecode.com\n"
10 "Report-Msgid-Bugs-To: marcin@rhodecode.com\n"
11 "POT-Creation-Date: 2021-01-14 15:36+0000\n"
11 "POT-Creation-Date: 2021-04-05 19:29+0000\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -111,7 +111,7 msgstr ""
111 #: rhodecode/apps/admin/views/settings.py:156
111 #: rhodecode/apps/admin/views/settings.py:156
112 #: rhodecode/apps/admin/views/settings.py:291
112 #: rhodecode/apps/admin/views/settings.py:291
113 #: rhodecode/apps/admin/views/settings.py:360
113 #: rhodecode/apps/admin/views/settings.py:360
114 #: rhodecode/apps/admin/views/settings.py:663
114 #: rhodecode/apps/admin/views/settings.py:664
115 #: rhodecode/apps/repository/views/repo_settings_vcs.py:116
115 #: rhodecode/apps/repository/views/repo_settings_vcs.py:116
116 msgid "Some form inputs contain invalid data."
116 msgid "Some form inputs contain invalid data."
117 msgstr ""
117 msgstr ""
@@ -135,54 +135,54 msgstr ""
135 msgid "Updated application settings"
135 msgid "Updated application settings"
136 msgstr ""
136 msgstr ""
137
137
138 #: rhodecode/apps/admin/views/settings.py:399
138 #: rhodecode/apps/admin/views/settings.py:400
139 msgid "Updated visualisation settings"
139 msgid "Updated visualisation settings"
140 msgstr ""
140 msgstr ""
141
141
142 #: rhodecode/apps/admin/views/settings.py:402
142 #: rhodecode/apps/admin/views/settings.py:403
143 msgid "Error occurred during updating visualisation settings"
143 msgid "Error occurred during updating visualisation settings"
144 msgstr ""
144 msgstr ""
145
145
146 #: rhodecode/apps/admin/views/settings.py:464
146 #: rhodecode/apps/admin/views/settings.py:465
147 #: rhodecode/apps/repository/views/repo_settings_issue_trackers.py:115
147 #: rhodecode/apps/repository/views/repo_settings_issue_trackers.py:115
148 msgid "Invalid issue tracker pattern: {}"
148 msgid "Invalid issue tracker pattern: {}"
149 msgstr ""
149 msgstr ""
150
150
151 #: rhodecode/apps/admin/views/settings.py:481
151 #: rhodecode/apps/admin/views/settings.py:482
152 #: rhodecode/apps/repository/views/repo_settings_issue_trackers.py:124
152 #: rhodecode/apps/repository/views/repo_settings_issue_trackers.py:124
153 msgid "Updated issue tracker entries"
153 msgid "Updated issue tracker entries"
154 msgstr ""
154 msgstr ""
155
155
156 #: rhodecode/apps/admin/views/settings.py:498
156 #: rhodecode/apps/admin/views/settings.py:499
157 #: rhodecode/apps/repository/views/repo_settings_issue_trackers.py:82
157 #: rhodecode/apps/repository/views/repo_settings_issue_trackers.py:82
158 msgid "Removed issue tracker entry."
158 msgid "Removed issue tracker entry."
159 msgstr ""
159 msgstr ""
160
160
161 #: rhodecode/apps/admin/views/settings.py:530
161 #: rhodecode/apps/admin/views/settings.py:531
162 msgid "Please enter email address"
162 msgid "Please enter email address"
163 msgstr ""
163 msgstr ""
164
164
165 #: rhodecode/apps/admin/views/settings.py:546
165 #: rhodecode/apps/admin/views/settings.py:547
166 msgid "Send email task created"
166 msgid "Send email task created"
167 msgstr ""
167 msgstr ""
168
168
169 #: rhodecode/apps/admin/views/settings.py:587
169 #: rhodecode/apps/admin/views/settings.py:588
170 msgid "Added new hook"
170 msgid "Added new hook"
171 msgstr ""
171 msgstr ""
172
172
173 #: rhodecode/apps/admin/views/settings.py:602
173 #: rhodecode/apps/admin/views/settings.py:603
174 msgid "Updated hooks"
174 msgid "Updated hooks"
175 msgstr ""
175 msgstr ""
176
176
177 #: rhodecode/apps/admin/views/settings.py:606
177 #: rhodecode/apps/admin/views/settings.py:607
178 msgid "Error occurred during hook creation"
178 msgid "Error occurred during hook creation"
179 msgstr ""
179 msgstr ""
180
180
181 #: rhodecode/apps/admin/views/settings.py:687
181 #: rhodecode/apps/admin/views/settings.py:688
182 msgid "Error occurred during updating labs settings"
182 msgid "Error occurred during updating labs settings"
183 msgstr ""
183 msgstr ""
184
184
185 #: rhodecode/apps/admin/views/settings.py:692
185 #: rhodecode/apps/admin/views/settings.py:693
186 msgid "Updated Labs settings"
186 msgid "Updated Labs settings"
187 msgstr ""
187 msgstr ""
188
188
@@ -592,7 +592,7 msgstr ""
592 msgid "1 month"
592 msgid "1 month"
593 msgstr ""
593 msgstr ""
594
594
595 #: rhodecode/apps/gist/views.py:63 rhodecode/public/js/scripts.js:48529
595 #: rhodecode/apps/gist/views.py:63 rhodecode/public/js/scripts.js:48670
596 #: rhodecode/public/js/scripts.min.js:1
596 #: rhodecode/public/js/scripts.min.js:1
597 #: rhodecode/public/js/rhodecode/i18n/js_translations.js:48
597 #: rhodecode/public/js/rhodecode/i18n/js_translations.js:48
598 #: rhodecode/public/js/src/rhodecode.js:634
598 #: rhodecode/public/js/src/rhodecode.js:634
@@ -653,8 +653,8 msgstr ""
653 #: rhodecode/templates/admin/repos/repo_add.mako:19
653 #: rhodecode/templates/admin/repos/repo_add.mako:19
654 #: rhodecode/templates/admin/users/user_edit_advanced.mako:12
654 #: rhodecode/templates/admin/users/user_edit_advanced.mako:12
655 #: rhodecode/templates/base/base.mako:114
655 #: rhodecode/templates/base/base.mako:114
656 #: rhodecode/templates/base/base.mako:133
656 #: rhodecode/templates/base/base.mako:134
657 #: rhodecode/templates/base/base.mako:1191
657 #: rhodecode/templates/base/base.mako:1192
658 msgid "Repositories"
658 msgid "Repositories"
659 msgstr ""
659 msgstr ""
660
660
@@ -894,104 +894,104 msgstr ""
894 msgid "No such commit exists for this repository. Commit: {}"
894 msgid "No such commit exists for this repository. Commit: {}"
895 msgstr ""
895 msgstr ""
896
896
897 #: rhodecode/apps/repository/views/repo_files.py:358
897 #: rhodecode/apps/repository/views/repo_files.py:359
898 msgid "Downloads disabled"
898 msgid "Downloads disabled"
899 msgstr ""
899 msgstr ""
900
900
901 #: rhodecode/apps/repository/views/repo_files.py:364
901 #: rhodecode/apps/repository/views/repo_files.py:365
902 msgid "Unknown archive type for: `{}`"
902 msgid "Unknown archive type for: `{}`"
903 msgstr ""
903 msgstr ""
904
904
905 #: rhodecode/apps/repository/views/repo_files.py:370
905 #: rhodecode/apps/repository/views/repo_files.py:371
906 msgid "Unknown commit_id {}"
906 msgid "Unknown commit_id {}"
907 msgstr ""
907 msgstr ""
908
908
909 #: rhodecode/apps/repository/views/repo_files.py:373
909 #: rhodecode/apps/repository/views/repo_files.py:374
910 msgid "Empty repository"
910 msgid "Empty repository"
911 msgstr ""
911 msgstr ""
912
912
913 #: rhodecode/apps/repository/views/repo_files.py:378
913 #: rhodecode/apps/repository/views/repo_files.py:384
914 msgid "No node at path {} for this repository"
914 msgid "No node at path {} for this repository"
915 msgstr ""
915 msgstr ""
916
916
917 #: rhodecode/apps/repository/views/repo_files.py:429
917 #: rhodecode/apps/repository/views/repo_files.py:436
918 msgid "Unknown archive type"
918 msgid "Unknown archive type"
919 msgstr ""
919 msgstr ""
920
920
921 #: rhodecode/apps/repository/views/repo_files.py:986
921 #: rhodecode/apps/repository/views/repo_files.py:993
922 msgid "Changesets"
922 msgid "Changesets"
923 msgstr ""
923 msgstr ""
924
924
925 #: rhodecode/apps/repository/views/repo_files.py:1007
925 #: rhodecode/apps/repository/views/repo_files.py:1014
926 #: rhodecode/apps/repository/views/repo_summary.py:243
926 #: rhodecode/apps/repository/views/repo_summary.py:239
927 #: rhodecode/model/pull_request.py:1910 rhodecode/model/scm.py:999
927 #: rhodecode/model/pull_request.py:1912 rhodecode/model/scm.py:999
928 #: rhodecode/templates/base/vcs_settings.mako:235
928 #: rhodecode/templates/base/vcs_settings.mako:235
929 #: rhodecode/templates/summary/components.mako:10
929 #: rhodecode/templates/summary/components.mako:10
930 msgid "Branches"
930 msgid "Branches"
931 msgstr ""
931 msgstr ""
932
932
933 #: rhodecode/apps/repository/views/repo_files.py:1011
933 #: rhodecode/apps/repository/views/repo_files.py:1018
934 #: rhodecode/model/scm.py:1016 rhodecode/templates/base/vcs_settings.mako:260
934 #: rhodecode/model/scm.py:1016 rhodecode/templates/base/vcs_settings.mako:260
935 #: rhodecode/templates/summary/components.mako:34
935 #: rhodecode/templates/summary/components.mako:34
936 msgid "Tags"
936 msgid "Tags"
937 msgstr ""
937 msgstr ""
938
938
939 #: rhodecode/apps/repository/views/repo_files.py:1155
939 #: rhodecode/apps/repository/views/repo_files.py:1162
940 #: rhodecode/apps/repository/views/repo_files.py:1181
940 #: rhodecode/apps/repository/views/repo_files.py:1188
941 msgid "Deleted file {} via RhodeCode Enterprise"
941 msgid "Deleted file {} via RhodeCode Enterprise"
942 msgstr ""
942 msgstr ""
943
943
944 #: rhodecode/apps/repository/views/repo_files.py:1202
944 #: rhodecode/apps/repository/views/repo_files.py:1209
945 msgid "Successfully deleted file `{}`"
945 msgid "Successfully deleted file `{}`"
946 msgstr ""
946 msgstr ""
947
947
948 #: rhodecode/apps/repository/views/repo_files.py:1206
948 #: rhodecode/apps/repository/views/repo_files.py:1213
949 #: rhodecode/apps/repository/views/repo_files.py:1326
950 #: rhodecode/apps/repository/views/repo_files.py:1450