diff --git a/kallithea/config/routing.py b/kallithea/config/routing.py
--- a/kallithea/config/routing.py
+++ b/kallithea/config/routing.py
@@ -319,8 +319,6 @@ def make_map(config):
action="settings_system", conditions=dict(method=["POST"]))
m.connect("admin_settings_system", "/settings/system",
action="settings_system", conditions=dict(method=["GET"]))
- m.connect("admin_settings_system_update", "/settings/system/updates",
- action="settings_system_update", conditions=dict(method=["GET"]))
# ADMIN MY ACCOUNT
with rmap.submapper(path_prefix=ADMIN_PREFIX,
diff --git a/kallithea/controllers/admin/settings.py b/kallithea/controllers/admin/settings.py
--- a/kallithea/controllers/admin/settings.py
+++ b/kallithea/controllers/admin/settings.py
@@ -422,7 +422,6 @@ class SettingsController(BaseController)
import kallithea
c.ini = kallithea.CONFIG
- c.update_url = defaults.get('update_url')
server_info = Setting.get_server_info()
for key, val in server_info.iteritems():
setattr(c, key, val)
@@ -432,46 +431,3 @@ class SettingsController(BaseController)
defaults=defaults,
encoding="UTF-8",
force_defaults=False)
-
- @HasPermissionAnyDecorator('hg.admin')
- def settings_system_update(self):
- import json
- import urllib2
- from kallithea.lib.verlib import NormalizedVersion
- from kallithea import __version__
-
- defaults = Setting.get_app_settings()
- defaults.update(self._get_hg_ui_settings())
- _update_url = defaults.get('update_url', '')
- _update_url = "" # FIXME: disabled
-
- _err = lambda s: '
%s
' % (s)
- try:
- import kallithea
- ver = kallithea.__version__
- log.debug('Checking for upgrade on `%s` server', _update_url)
- opener = urllib2.build_opener()
- opener.addheaders = [('User-agent', 'Kallithea-SCM/%s' % ver)]
- response = opener.open(_update_url)
- response_data = response.read()
- data = json.loads(response_data)
- except urllib2.URLError as e:
- log.error(traceback.format_exc())
- return _err('Failed to contact upgrade server: %r' % e)
- except ValueError as e:
- log.error(traceback.format_exc())
- return _err('Bad data sent from update server')
-
- latest = data['versions'][0]
-
- c.update_url = _update_url
- c.latest_data = latest
- c.latest_ver = latest['version']
- c.cur_ver = __version__
- c.should_upgrade = False
-
- if NormalizedVersion(c.latest_ver) > NormalizedVersion(c.cur_ver):
- c.should_upgrade = True
- c.important_notices = latest['general']
-
- return render('admin/settings/settings_system_update.html'),
diff --git a/kallithea/lib/db_manage.py b/kallithea/lib/db_manage.py
--- a/kallithea/lib/db_manage.py
+++ b/kallithea/lib/db_manage.py
@@ -370,7 +370,6 @@ class DbManage(object):
('gravatar_url', User.DEFAULT_GRAVATAR_URL, 'unicode'),
('clone_uri_tmpl', Repository.DEFAULT_CLONE_URI, 'unicode'),
('clone_ssh_tmpl', Repository.DEFAULT_CLONE_SSH, 'unicode'),
- ('update_url', Setting.DEFAULT_UPDATE_URL, 'unicode'),
]
for key, val, type_ in settings:
sett = Setting(key, val, type_)
diff --git a/kallithea/templates/admin/settings/settings_system.html b/kallithea/templates/admin/settings/settings_system.html
--- a/kallithea/templates/admin/settings/settings_system.html
+++ b/kallithea/templates/admin/settings/settings_system.html
@@ -4,13 +4,12 @@
<%
elems = [
- (_('Kallithea version'), h.literal('%s %s') % (c.kallithea_version, _('Check for updates')), ''),
+ (_('Kallithea version'), c.kallithea_version, ''),
(_('Kallithea configuration file'), c.ini['__file__'], ''),
(_('Python version'), c.py_version, ''),
(_('Platform'), c.platform, ''),
(_('Git version'), c.git_version, ''),
(_('Git path'), c.ini.get('git_path'), ''),
- (_('Upgrade info endpoint'), h.literal('%s
%s.') % (c.update_url, _('Note: please make sure this server can access this URL')), ''),
]
%>
@@ -31,11 +30,3 @@
%endfor
-
-