diff --git a/rhodecode/api/views/repo_api.py b/rhodecode/api/views/repo_api.py --- a/rhodecode/api/views/repo_api.py +++ b/rhodecode/api/views/repo_api.py @@ -1902,6 +1902,7 @@ def get_repo_settings(request, apiuser, "id": 237, "result": { "extensions_largefiles": true, + "extensions_evolve": true, "hooks_changegroup_push_logger": true, "hooks_changegroup_repo_size": false, "hooks_outgoing_pull_logger": true, 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 @@ -363,6 +363,14 @@ class DbManage(object): hgsubversion.ui_active = False self.sa.add(hgsubversion) + # enable hgevolve disabled by default + hgevolve = RhodeCodeUi() + hgevolve.ui_section = 'extensions' + hgevolve.ui_key = 'evolve' + hgevolve.ui_value = '' + hgevolve.ui_active = False + self.sa.add(hgevolve) + # enable hggit disabled by default hggit = RhodeCodeUi() hggit.ui_section = 'extensions' diff --git a/rhodecode/lib/vcs/backends/hg/commit.py b/rhodecode/lib/vcs/backends/hg/commit.py --- a/rhodecode/lib/vcs/backends/hg/commit.py +++ b/rhodecode/lib/vcs/backends/hg/commit.py @@ -171,6 +171,16 @@ class MercurialCommit(base.BaseCommit): return safe_unicode(phase_text) @LazyProperty + def obsolete(self): + obsolete = self._remote.ctx_obsolete(self.idx) + return obsolete + + @LazyProperty + def hidden(self): + hidden = self._remote.ctx_hidden(self.idx) + return hidden + + @LazyProperty def children(self): """ Returns list of child commits. diff --git a/rhodecode/model/forms.py b/rhodecode/model/forms.py --- a/rhodecode/model/forms.py +++ b/rhodecode/model/forms.py @@ -384,6 +384,7 @@ class _BaseVcsSettingsForm(formencode.Sc # hg extensions_largefiles = v.StringBoolean(if_missing=False) + extensions_evolve = v.StringBoolean(if_missing=False) phases_publish = v.StringBoolean(if_missing=False) rhodecode_hg_use_rebase_for_merging = v.StringBoolean(if_missing=False) diff --git a/rhodecode/model/settings.py b/rhodecode/model/settings.py --- a/rhodecode/model/settings.py +++ b/rhodecode/model/settings.py @@ -415,15 +415,16 @@ class VcsSettingsModel(object): ('hooks', 'outgoing.pull_logger'),) HG_SETTINGS = ( ('extensions', 'largefiles'), - ('phases', 'publish'),) + ('phases', 'publish'), + ('extensions', 'evolve'),) GIT_SETTINGS = ( ('vcs_git_lfs', 'enabled'),) - GLOBAL_HG_SETTINGS = ( ('extensions', 'largefiles'), ('largefiles', 'usercache'), ('phases', 'publish'), - ('extensions', 'hgsubversion')) + ('extensions', 'hgsubversion'), + ('extensions', 'evolve'),) GLOBAL_GIT_SETTINGS = ( ('vcs_git_lfs', 'enabled'), ('vcs_git_lfs', 'store_location')) @@ -546,22 +547,26 @@ class VcsSettingsModel(object): @assert_repo_settings def create_or_update_repo_hg_settings(self, data): - largefiles, phases = \ + largefiles, phases, evolve = \ self.HG_SETTINGS - largefiles_key, phases_key = \ + largefiles_key, phases_key, evolve_key = \ self._get_settings_keys(self.HG_SETTINGS, data) self._create_or_update_ui( self.repo_settings, *largefiles, value='', active=data[largefiles_key]) self._create_or_update_ui( + self.repo_settings, *evolve, value='', + active=data[evolve_key]) + self._create_or_update_ui( self.repo_settings, *phases, value=safe_str(data[phases_key])) def create_or_update_global_hg_settings(self, data): - largefiles, largefiles_store, phases, hgsubversion \ + largefiles, largefiles_store, phases, hgsubversion, evolve \ = self.GLOBAL_HG_SETTINGS - largefiles_key, largefiles_store_key, phases_key, subversion_key \ + largefiles_key, largefiles_store_key, phases_key, subversion_key, evolve_key \ = self._get_settings_keys(self.GLOBAL_HG_SETTINGS, data) + self._create_or_update_ui( self.global_settings, *largefiles, value='', active=data[largefiles_key]) @@ -572,6 +577,9 @@ class VcsSettingsModel(object): 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]) def create_or_update_repo_git_settings(self, data): # NOTE(marcink): # comma make unpack work properly diff --git a/rhodecode/public/css/tables.less b/rhodecode/public/css/tables.less --- a/rhodecode/public/css/tables.less +++ b/rhodecode/public/css/tables.less @@ -108,6 +108,11 @@ table.dataTable { &.td-hash { min-width: 80px; width: 200px; + + .obsolete { + text-decoration: line-through; + color: lighten(@grey2,25%); + } } &.td-time { 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 @@ -130,6 +130,19 @@ ${_('Requires hgsubversion library to be installed. Allows cloning remote SVN repositories and migrates them to Mercurial type.')} % endif + +
- ${h.show_id(commit)}
+ ${h.show_id(commit)}
% if hasattr(commit, 'phase'):
% if commit.phase != 'public':
- ${commit.phase}
+ ${commit.phase}
% endif
% endif
+
+ ## obsolete commits
+ % if hasattr(commit, 'obsolete'):
+ % if commit.obsolete:
+ ${_('obsolete')}
+ % endif
+ % endif
+
+ ## hidden commits
+ % if hasattr(commit, 'hidden'):
+ % if commit.hidden:
+ ${_('hidden')}
+ % endif
+ % endif
+