Show More
@@ -22,6 +22,7 b' import logging' | |||
|
22 | 22 | |
|
23 | 23 | from pyramid.view import view_config |
|
24 | 24 | from pyramid.httpexceptions import HTTPFound |
|
25 | from packaging.version import Version | |
|
25 | 26 | |
|
26 | 27 | from rhodecode import events |
|
27 | 28 | from rhodecode.apps._base import RepoAppView |
@@ -70,6 +71,13 b' class RepoSettingsView(RepoAppView):' | |||
|
70 | 71 | .filter(UserFollowing.follows_repository == self.db_repo).scalar() |
|
71 | 72 | |
|
72 | 73 | c.ver_info_dict = self.rhodecode_vcs_repo.get_hooks_info() |
|
74 | c.hooks_outdated = False | |
|
75 | ||
|
76 | try: | |
|
77 | if Version(c.ver_info_dict['pre_version']) < Version(c.rhodecode_version): | |
|
78 | c.hooks_outdated = True | |
|
79 | except Exception: | |
|
80 | pass | |
|
73 | 81 | |
|
74 | 82 | # update commit cache if GET flag is present |
|
75 | 83 | if self.request.GET.get('update_commit_cache'): |
@@ -147,6 +147,11 b'' | |||
|
147 | 147 | onclick="return confirm('${_('Confirm to reinstall hooks for this repository.')}');"> |
|
148 | 148 | ${_('Update Hooks')} |
|
149 | 149 | </a> |
|
150 | % if c.hooks_outdated: | |
|
151 | <span class="alert-error" style="padding: 10px"> | |
|
152 | ${_('Outdated hooks detected, please update hooks using `Update Hooks` action.')} | |
|
153 | </span> | |
|
154 | % endif | |
|
150 | 155 | </div> |
|
151 | 156 | </div> |
|
152 | 157 |
General Comments 0
You need to be logged in to leave comments.
Login now