changeset 3576:c177f304eb40 beta

files: accept URLs with no path and no slash after the revision This kind of URLs will frequently be edited by hand and trailing slashes are usually just ignored.
author Mads Kiilerich <madski@unity3d.com>
date Thu, 21 Mar 2013 11:26:58 +0100
parents ca7785fae354
children 238486bb71ab
files rhodecode/config/routing.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/config/routing.py	Wed Mar 20 15:32:23 2013 +0100
+++ b/rhodecode/config/routing.py	Thu Mar 21 11:26:58 2013 +0100
@@ -583,6 +583,10 @@
                 controller='files', revision='tip', f_path='',
                 conditions=dict(function=check_repo))
 
+    rmap.connect('files_home_nopath', '/{repo_name:.*?}/files/{revision}',
+                controller='files', revision='tip', f_path='',
+                conditions=dict(function=check_repo))
+
     rmap.connect('files_history_home',
                  '/{repo_name:.*?}/history/{revision}/{f_path:.*}',
                  controller='files', action='history', revision='tip', f_path='',