From 56fcfd0278377eb6f3b0318b1f3c0a9e6abf7895 Mon Sep 17 00:00:00 2001 From: Eric Sunshine Date: Wed, 31 Dec 2014 04:50:10 -0500 Subject: [PATCH] route: recognize hierarchical branch names Branch names in Git may be hierarchical (for example, "wip/parser/fix"), however, git-arr's Bottle routing rules do not take this into account. Fix this shortcoming. Signed-off-by: Eric Sunshine Signed-off-by: Alberto Bertogli --- git-arr | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/git-arr b/git-arr index 66b49ba..5a650ee 100755 --- a/git-arr +++ b/git-arr @@ -224,8 +224,8 @@ def commit(repo, cid): return dict(repo = repo, c=c) -@bottle.route('/r//b//t/f=.html') -@bottle.route('/r//b//t//f=.html') +@bottle.route('/r//b//t/f=.html') +@bottle.route('/r//b//t//f=.html') @bottle.view('blob') @with_utils def blob(repo, bname, fname, dirname = ''): @@ -244,8 +244,8 @@ def blob(repo, bname, fname, dirname = ''): return dict(repo = r, dirname = dirname, fname = fname, blob = content) -@bottle.route('/r//b//t/') -@bottle.route('/r//b//t//') +@bottle.route('/r//b//t/') +@bottle.route('/r//b//t//') @bottle.view('tree') @with_utils def tree(repo, bname, dirname = ''): @@ -257,8 +257,8 @@ def tree(repo, bname, dirname = ''): r = repo.new_in_branch(bname) return dict(repo = r, tree = r.tree(), dirname = dirname) -@bottle.route('/r//b//') -@bottle.route('/r//b//.html') +@bottle.route('/r//b//') +@bottle.route('/r//b//.html') @bottle.view('branch') @with_utils def branch(repo, bname, offset = 0):