feature: redirect to repo remove if repo is damaged
This commit is contained in:
parent
b7c79549cc
commit
3877c500e5
4 changed files with 57 additions and 8 deletions
|
|
@ -309,7 +309,9 @@ class RepoAppView(BaseAppView):
|
|||
|
||||
c.path_filter = self.path_filter # used by atom_feed_entry.mako
|
||||
|
||||
if self.rhodecode_vcs_repo is None:
|
||||
is_broken = self.request.params.get("broken") # needed to prevent infinit loop
|
||||
|
||||
if self.rhodecode_vcs_repo is None and is_broken is None:
|
||||
# unable to fetch this repo as vcs instance, report back to user
|
||||
log.debug("Repository was not found on filesystem, check if it exists or is not damaged")
|
||||
h.flash(
|
||||
|
|
@ -329,8 +331,15 @@ class RepoAppView(BaseAppView):
|
|||
|
||||
raise HTTPFound(h.route_path("repo_summary", repo_name=self.db_repo_name))
|
||||
|
||||
else: # redirect if we don't show missing requirements
|
||||
raise HTTPFound(h.route_path("home"))
|
||||
else: # give user possibility to remove broken repo
|
||||
raise HTTPFound(
|
||||
h.route_path(
|
||||
"edit_repo_advanced",
|
||||
repo_name=self.db_repo_name,
|
||||
_anchor="advanced-delete",
|
||||
_query={"broken": True},
|
||||
)
|
||||
)
|
||||
|
||||
c.has_origin_repo_read_perm = False
|
||||
if self.db_repo.fork:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue