diff --git a/rhodecode/apps/_base/__init__.py b/rhodecode/apps/_base/__init__.py --- a/rhodecode/apps/_base/__init__.py +++ b/rhodecode/apps/_base/__init__.py @@ -309,9 +309,6 @@ class BaseReferencesView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context() - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo - self._register_global_c(c) return c diff --git a/rhodecode/apps/repository/views/repo_caches.py b/rhodecode/apps/repository/views/repo_caches.py --- a/rhodecode/apps/repository/views/repo_caches.py +++ b/rhodecode/apps/repository/views/repo_caches.py @@ -37,9 +37,6 @@ class RepoCachesView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context() - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo - self._register_global_c(c) return c diff --git a/rhodecode/apps/repository/views/repo_changelog.py b/rhodecode/apps/repository/views/repo_changelog.py --- a/rhodecode/apps/repository/views/repo_changelog.py +++ b/rhodecode/apps/repository/views/repo_changelog.py @@ -150,10 +150,7 @@ class RepoChangelogView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context(include_app_defaults=True) - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo c.rhodecode_repo = self.rhodecode_vcs_repo - self._register_global_c(c) return c diff --git a/rhodecode/apps/repository/views/repo_commits.py b/rhodecode/apps/repository/views/repo_commits.py --- a/rhodecode/apps/repository/views/repo_commits.py +++ b/rhodecode/apps/repository/views/repo_commits.py @@ -148,9 +148,6 @@ def _context_url(request, fileid=None): class RepoCommitsView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context(include_app_defaults=True) - - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo c.rhodecode_repo = self.rhodecode_vcs_repo self._register_global_c(c) diff --git a/rhodecode/apps/repository/views/repo_compare.py b/rhodecode/apps/repository/views/repo_compare.py --- a/rhodecode/apps/repository/views/repo_compare.py +++ b/rhodecode/apps/repository/views/repo_compare.py @@ -45,8 +45,6 @@ class RepoCompareView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context(include_app_defaults=True) - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo c.rhodecode_repo = self.rhodecode_vcs_repo self._register_global_c(c) diff --git a/rhodecode/apps/repository/views/repo_feed.py b/rhodecode/apps/repository/views/repo_feed.py --- a/rhodecode/apps/repository/views/repo_feed.py +++ b/rhodecode/apps/repository/views/repo_feed.py @@ -42,9 +42,6 @@ class RepoFeedView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context() - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo - self._register_global_c(c) self._load_defaults() return c diff --git a/rhodecode/apps/repository/views/repo_files.py b/rhodecode/apps/repository/views/repo_files.py --- a/rhodecode/apps/repository/views/repo_files.py +++ b/rhodecode/apps/repository/views/repo_files.py @@ -81,8 +81,6 @@ class RepoFilesView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context(include_app_defaults=True) - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo c.rhodecode_repo = self.rhodecode_vcs_repo self._register_global_c(c) diff --git a/rhodecode/apps/repository/views/repo_forks.py b/rhodecode/apps/repository/views/repo_forks.py --- a/rhodecode/apps/repository/views/repo_forks.py +++ b/rhodecode/apps/repository/views/repo_forks.py @@ -46,9 +46,6 @@ class RepoForksView(RepoAppView, DataGri def load_default_context(self): c = self._get_local_tmpl_context(include_app_defaults=True) - - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo c.rhodecode_repo = self.rhodecode_vcs_repo acl_groups = RepoGroupList( @@ -227,7 +224,7 @@ class RepoForksView(RepoAppView, DataGri if isinstance(task, BaseAsyncResult): task_id = task.task_id except formencode.Invalid as errors: - c.repo_info = self.db_repo + c.rhodecode_db_repo = self.db_repo data = render('rhodecode:templates/forks/fork.mako', self._get_template_context(c), self.request) diff --git a/rhodecode/apps/repository/views/repo_maintainance.py b/rhodecode/apps/repository/views/repo_maintainance.py --- a/rhodecode/apps/repository/views/repo_maintainance.py +++ b/rhodecode/apps/repository/views/repo_maintainance.py @@ -33,9 +33,6 @@ class RepoMaintenanceView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context() - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo - self._register_global_c(c) return c diff --git a/rhodecode/apps/repository/views/repo_permissions.py b/rhodecode/apps/repository/views/repo_permissions.py --- a/rhodecode/apps/repository/views/repo_permissions.py +++ b/rhodecode/apps/repository/views/repo_permissions.py @@ -40,9 +40,6 @@ class RepoSettingsPermissionsView(RepoAp def load_default_context(self): c = self._get_local_tmpl_context() - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo - self._register_global_c(c) return c diff --git a/rhodecode/apps/repository/views/repo_pull_requests.py b/rhodecode/apps/repository/views/repo_pull_requests.py --- a/rhodecode/apps/repository/views/repo_pull_requests.py +++ b/rhodecode/apps/repository/views/repo_pull_requests.py @@ -57,8 +57,6 @@ class RepoPullRequestsView(RepoAppView, def load_default_context(self): c = self._get_local_tmpl_context(include_app_defaults=True) - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo c.REVIEW_STATUS_APPROVED = ChangesetStatus.STATUS_APPROVED c.REVIEW_STATUS_REJECTED = ChangesetStatus.STATUS_REJECTED self._register_global_c(c) diff --git a/rhodecode/apps/repository/views/repo_review_rules.py b/rhodecode/apps/repository/views/repo_review_rules.py --- a/rhodecode/apps/repository/views/repo_review_rules.py +++ b/rhodecode/apps/repository/views/repo_review_rules.py @@ -33,9 +33,6 @@ class RepoReviewRulesView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context() - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo - self._register_global_c(c) return c diff --git a/rhodecode/apps/repository/views/repo_settings.py b/rhodecode/apps/repository/views/repo_settings.py --- a/rhodecode/apps/repository/views/repo_settings.py +++ b/rhodecode/apps/repository/views/repo_settings.py @@ -44,9 +44,6 @@ class RepoSettingsView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context() - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo - acl_groups = RepoGroupList( RepoGroup.query().all(), perm_set=['group.write', 'group.admin']) diff --git a/rhodecode/apps/repository/views/repo_settings_advanced.py b/rhodecode/apps/repository/views/repo_settings_advanced.py --- a/rhodecode/apps/repository/views/repo_settings_advanced.py +++ b/rhodecode/apps/repository/views/repo_settings_advanced.py @@ -43,9 +43,6 @@ class RepoSettingsView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context() - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo - self._register_global_c(c) return c diff --git a/rhodecode/apps/repository/views/repo_settings_fields.py b/rhodecode/apps/repository/views/repo_settings_fields.py --- a/rhodecode/apps/repository/views/repo_settings_fields.py +++ b/rhodecode/apps/repository/views/repo_settings_fields.py @@ -43,9 +43,6 @@ class RepoSettingsFieldsView(RepoAppView def load_default_context(self): c = self._get_local_tmpl_context() - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo - self._register_global_c(c) return c diff --git a/rhodecode/apps/repository/views/repo_settings_issue_trackers.py b/rhodecode/apps/repository/views/repo_settings_issue_trackers.py --- a/rhodecode/apps/repository/views/repo_settings_issue_trackers.py +++ b/rhodecode/apps/repository/views/repo_settings_issue_trackers.py @@ -39,9 +39,6 @@ class RepoSettingsIssueTrackersView(Repo def load_default_context(self): c = self._get_local_tmpl_context() - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo - self._register_global_c(c) return c diff --git a/rhodecode/apps/repository/views/repo_settings_remote.py b/rhodecode/apps/repository/views/repo_settings_remote.py --- a/rhodecode/apps/repository/views/repo_settings_remote.py +++ b/rhodecode/apps/repository/views/repo_settings_remote.py @@ -36,9 +36,6 @@ class RepoSettingsRemoteView(RepoAppView def load_default_context(self): c = self._get_local_tmpl_context() - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo - self._register_global_c(c) return c diff --git a/rhodecode/apps/repository/views/repo_settings_vcs.py b/rhodecode/apps/repository/views/repo_settings_vcs.py --- a/rhodecode/apps/repository/views/repo_settings_vcs.py +++ b/rhodecode/apps/repository/views/repo_settings_vcs.py @@ -43,9 +43,6 @@ class RepoSettingsVcsView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context() - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo - self._register_global_c(c) return c diff --git a/rhodecode/apps/repository/views/repo_strip.py b/rhodecode/apps/repository/views/repo_strip.py --- a/rhodecode/apps/repository/views/repo_strip.py +++ b/rhodecode/apps/repository/views/repo_strip.py @@ -35,9 +35,6 @@ class StripView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context() - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo - self._register_global_c(c) return c diff --git a/rhodecode/apps/repository/views/repo_summary.py b/rhodecode/apps/repository/views/repo_summary.py --- a/rhodecode/apps/repository/views/repo_summary.py +++ b/rhodecode/apps/repository/views/repo_summary.py @@ -48,8 +48,6 @@ class RepoSummaryView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context(include_app_defaults=True) - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo c.rhodecode_repo = None if not c.repository_requirements_missing: c.rhodecode_repo = self.rhodecode_vcs_repo diff --git a/rhodecode/integrations/views.py b/rhodecode/integrations/views.py --- a/rhodecode/integrations/views.py +++ b/rhodecode/integrations/views.py @@ -393,8 +393,7 @@ class RepoIntegrationsView(IntegrationSe c.repo = self.repo c.repo_group = self.repo_group - # TODO(marcink): remove repo_info and use c.rhodecode_db_repo instead - c.repo_info = self.db_repo = self.repo + self.db_repo = self.repo c.rhodecode_db_repo = self.repo c.repo_name = self.db_repo.repo_name c.repository_pull_requests = ScmModel().get_pull_requests(self.repo) diff --git a/rhodecode/templates/admin/repos/repo_edit.mako b/rhodecode/templates/admin/repos/repo_edit.mako --- a/rhodecode/templates/admin/repos/repo_edit.mako +++ b/rhodecode/templates/admin/repos/repo_edit.mako @@ -5,7 +5,7 @@ <%inherit file="/base/base.mako"/> <%def name="title()"> - ${_('%s repository settings') % c.repo_info.repo_name} + ${_('%s repository settings') % c.rhodecode_db_repo.repo_name} %if c.rhodecode_name: · ${h.branding(c.rhodecode_name)} %endif @@ -63,7 +63,7 @@
  • ${_('Caches')}
  • - %if c.repo_info.repo_type != 'svn': + %if c.rhodecode_db_repo.repo_type != 'svn':
  • ${_('Remote')}
  • @@ -74,7 +74,7 @@
  • ${_('Integrations')}
  • - %if c.repo_info.repo_type != 'svn': + %if c.rhodecode_db_repo.repo_type != 'svn':
  • ${_('Reviewer Rules')}
  • diff --git a/rhodecode/templates/admin/repos/repo_edit_advanced.mako b/rhodecode/templates/admin/repos/repo_edit_advanced.mako --- a/rhodecode/templates/admin/repos/repo_edit_advanced.mako +++ b/rhodecode/templates/admin/repos/repo_edit_advanced.mako @@ -2,16 +2,16 @@ <% elems = [ - (_('Owner'), lambda:base.gravatar_with_user(c.repo_info.user.email), '', ''), - (_('Created on'), h.format_date(c.repo_info.created_on), '', ''), - (_('Updated on'), h.format_date(c.repo_info.updated_on), '', ''), - (_('Cached Commit id'), lambda: h.link_to(c.repo_info.changeset_cache.get('short_id'), h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.repo_info.changeset_cache.get('raw_id'))), '', ''), + (_('Owner'), lambda:base.gravatar_with_user(c.rhodecode_db_repo.user.email), '', ''), + (_('Created on'), h.format_date(c.rhodecode_db_repo.created_on), '', ''), + (_('Updated on'), h.format_date(c.rhodecode_db_repo.updated_on), '', ''), + (_('Cached Commit id'), lambda: h.link_to(c.rhodecode_db_repo.changeset_cache.get('short_id'), h.route_path('repo_commit',repo_name=c.repo_name,commit_id=c.rhodecode_db_repo.changeset_cache.get('raw_id'))), '', ''), ] %>
    -

    ${_('Repository: %s') % c.repo_info.repo_name}

    +

    ${_('Repository: %s') % c.rhodecode_db_repo.repo_name}

    ${base.dt_info_panel(elems)} @@ -24,16 +24,16 @@

    ${_('Fork Reference')}

    - ${h.secure_form(h.route_path('edit_repo_advanced_fork', repo_name=c.repo_info.repo_name), method='POST', request=request)} + ${h.secure_form(h.route_path('edit_repo_advanced_fork', repo_name=c.rhodecode_db_repo.repo_name), method='POST', request=request)} - % if c.repo_info.fork: -
    ${h.literal(_('This repository is a fork of %(repo_link)s') % {'repo_link': h.link_to_if(c.has_origin_repo_read_perm,c.repo_info.fork.repo_name, h.route_path('repo_summary', repo_name=c.repo_info.fork.repo_name))})} + % if c.rhodecode_db_repo.fork: +
    ${h.literal(_('This repository is a fork of %(repo_link)s') % {'repo_link': h.link_to_if(c.has_origin_repo_read_perm,c.rhodecode_db_repo.fork.repo_name, h.route_path('repo_summary', repo_name=c.rhodecode_db_repo.fork.repo_name))})} |
    % endif
    ${h.hidden('id_fork_of')} - ${h.submit('set_as_fork_%s' % c.repo_info.repo_name,_('Set'),class_="btn btn-small",)} + ${h.submit('set_as_fork_%s' % c.rhodecode_db_repo.repo_name,_('Set'),class_="btn btn-small",)}
    ${_('Manually set this repository as a fork of another from the list')} @@ -48,7 +48,7 @@

    ${_('Public Journal Visibility')}

    - ${h.secure_form(h.route_path('edit_repo_advanced_journal', repo_name=c.repo_info.repo_name), method='POST', request=request)} + ${h.secure_form(h.route_path('edit_repo_advanced_journal', repo_name=c.rhodecode_db_repo.repo_name), method='POST', request=request)}
    %if c.in_public_journal:
    - ${h.secure_form(h.route_path('edit_repo_advanced_locking', repo_name=c.repo_info.repo_name), method='POST', request=request)} + ${h.secure_form(h.route_path('edit_repo_advanced_locking', repo_name=c.rhodecode_db_repo.repo_name), method='POST', request=request)} - %if c.repo_info.locked[0]: -
    ${'Locked by %s on %s. Lock reason: %s' % (h.person_by_id(c.repo_info.locked[0]), - h.format_date(h. time_to_datetime(c.repo_info.locked[1])), c.repo_info.locked[2])}
    + %if c.rhodecode_db_repo.locked[0]: +
    ${'Locked by %s on %s. Lock reason: %s' % (h.person_by_id(c.rhodecode_db_repo.locked[0]), + h.format_date(h. time_to_datetime(c.rhodecode_db_repo.locked[1])), c.rhodecode_db_repo.locked[2])}
    %else:
    ${_('This Repository is not currently locked.')}
    %endif
    - %if c.repo_info.locked[0]: + %if c.rhodecode_db_repo.locked[0]: ${h.hidden('set_unlock', '1')}