diff --git a/rhodecode/apps/admin/tests/test_admin_settings.py b/rhodecode/apps/admin/tests/test_admin_settings.py --- a/rhodecode/apps/admin/tests/test_admin_settings.py +++ b/rhodecode/apps/admin/tests/test_admin_settings.py @@ -255,23 +255,6 @@ class TestAdminSettingsVcs(object): 'csrf_token': csrf_token}, status=404) - def test_extensions_hgsubversion(self, form_defaults, csrf_token): - form_defaults.update({ - 'csrf_token': csrf_token, - 'extensions_hgsubversion': 'True', - }) - response = self.app.post( - route_path('admin_settings_vcs_update'), - params=form_defaults, - status=302) - - response = response.follow() - extensions_input = ( - '') - response.mustcontain(extensions_input) - def test_extensions_hgevolve(self, form_defaults, csrf_token): form_defaults.update({ 'csrf_token': csrf_token, diff --git a/rhodecode/lib/db_manage.py b/rhodecode/lib/db_manage.py --- a/rhodecode/lib/db_manage.py +++ b/rhodecode/lib/db_manage.py @@ -378,14 +378,6 @@ class DbManage(object): self.sa.add(lfsstore) - # enable hgsubversion disabled by default - hgsubversion = RhodeCodeUi() - hgsubversion.ui_section = 'extensions' - hgsubversion.ui_key = 'hgsubversion' - hgsubversion.ui_value = '' - hgsubversion.ui_active = False - self.sa.add(hgsubversion) - # enable hgevolve disabled by default hgevolve = RhodeCodeUi() hgevolve.ui_section = 'extensions' diff --git a/rhodecode/lib/vcs/backends/base.py b/rhodecode/lib/vcs/backends/base.py --- a/rhodecode/lib/vcs/backends/base.py +++ b/rhodecode/lib/vcs/backends/base.py @@ -1842,6 +1842,11 @@ class Config(object): def clear_section(self, section): self._values[section] = {} + def drop_option(self, section, option): + if section not in self._values: + raise ValueError(f'Section {section} does not exist') + del self._values[section][option] + def serialize(self): """ Creates a list of three tuples (section, key, value) representing diff --git a/rhodecode/lib/vcs/backends/hg/repository.py b/rhodecode/lib/vcs/backends/hg/repository.py --- a/rhodecode/lib/vcs/backends/hg/repository.py +++ b/rhodecode/lib/vcs/backends/hg/repository.py @@ -79,6 +79,13 @@ class MercurialRepository(BaseRepository # special requirements self.config = config if config else self.get_default_config( default=[('extensions', 'largefiles', '')]) + + # NOTE(marcink): since python3 hgsubversion is deprecated. + # From old installations we might still have this set enabled + # we explicitly remove this now here to make sure it wont propagate further + if config.get('extensions', 'hgsubversion') is not None: + config.drop_option('extensions', 'hgsubversion') + self.with_wire = with_wire or {"cache": False} # default should not use cache self._init_repo(create, src_url, do_workspace_checkout) diff --git a/rhodecode/model/forms.py b/rhodecode/model/forms.py --- a/rhodecode/model/forms.py +++ b/rhodecode/model/forms.py @@ -444,7 +444,6 @@ def ApplicationUiSettingsForm(localizer) vcs_git_lfs_store_location = All( v.ValidPath(localizer), v.UnicodeString(strip=True, min=2, not_empty=True)) - extensions_hgsubversion = v.StringBoolean(if_missing=False) extensions_hggit = v.StringBoolean(if_missing=False) new_svn_branch = v.ValidSvnPattern(localizer, section='vcs_svn_branch') new_svn_tag = v.ValidSvnPattern(localizer, section='vcs_svn_tag') diff --git a/rhodecode/model/settings.py b/rhodecode/model/settings.py --- a/rhodecode/model/settings.py +++ b/rhodecode/model/settings.py @@ -488,7 +488,6 @@ class VcsSettingsModel(object): ('extensions', 'largefiles'), ('largefiles', 'usercache'), ('phases', 'publish'), - ('extensions', 'hgsubversion'), ('extensions', 'evolve'), ('extensions', 'topic'), ('experimental', 'evolution'), @@ -672,10 +671,11 @@ class VcsSettingsModel(object): self.repo_settings, *phases, value=safe_str(data[phases_key])) def create_or_update_global_hg_settings(self, data): - largefiles, largefiles_store, phases, hgsubversion, evolve \ - = self.GLOBAL_HG_SETTINGS[:5] - largefiles_key, largefiles_store_key, phases_key, subversion_key, evolve_key \ - = self._get_settings_keys(self.GLOBAL_HG_SETTINGS[:5], data) + opts_len = 4 + largefiles, largefiles_store, phases, evolve \ + = self.GLOBAL_HG_SETTINGS[:opts_len] + largefiles_key, largefiles_store_key, phases_key, evolve_key \ + = self._get_settings_keys(self.GLOBAL_HG_SETTINGS[:opts_len], data) self._create_or_update_ui( self.global_settings, *largefiles, value='', @@ -685,8 +685,6 @@ class VcsSettingsModel(object): self._create_or_update_ui( self.global_settings, *phases, value=safe_str(data[phases_key])) self._create_or_update_ui( - self.global_settings, *hgsubversion, active=data[subversion_key]) - self._create_or_update_ui( self.global_settings, *evolve, value='', active=data[evolve_key]) self._set_evolution(self.global_settings, is_enabled=data[evolve_key]) diff --git a/rhodecode/templates/base/vcs_settings.mako b/rhodecode/templates/base/vcs_settings.mako --- a/rhodecode/templates/base/vcs_settings.mako +++ b/rhodecode/templates/base/vcs_settings.mako @@ -121,15 +121,6 @@