Mercurial > kallithea
changeset 4022:4a0bce848ed8
changelog: use unknown branch names as revisions
Makes the system more resilient
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 14 Jun 2013 16:27:34 +0200 |
parents | b619842f173d |
children | e29b927d4de4 |
files | rhodecode/controllers/changelog.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/controllers/changelog.py Wed Jun 19 00:23:51 2013 +0200 +++ b/rhodecode/controllers/changelog.py Fri Jun 14 16:27:34 2013 +0200 @@ -136,6 +136,13 @@ c.size = max(c.size, 1) p = safe_int(request.GET.get('page', 1), 1) branch_name = request.GET.get('branch', None) + if (branch_name and + branch_name not in c.rhodecode_repo.branches and + branch_name not in c.rhodecode_repo.closed_branches and + not revision): + return redirect(url('changelog_file_home', repo_name=c.repo_name, + revision=branch_name, f_path=f_path or '')) + c.changelog_for_path = f_path try: