From ba640f35c35bffb0e6a25607ef1a244145ec6f1b Mon Sep 17 00:00:00 2001 From: Mathieu Bridon Date: Mar 19 2014 10:24:16 +0000 Subject: View a branch from the DB repo --- diff --git a/progit/app.py b/progit/app.py index 6e62479..da524c2 100644 --- a/progit/app.py +++ b/progit/app.py @@ -228,10 +228,13 @@ def view_repo_branch(repo, branchname): def view_log(repo, branchname=None): """ Displays the logs of the specified repo. """ - reponame = os.path.join(APP.config['GIT_FOLDER'], repo) - if not os.path.exists(reponame): + repo = progit.lib.get_project(SESSION, repo) + + if repo is None: flask.abort(404) - repo_obj = pygit2.Repository(reponame) + + repo_obj = pygit2.Repository(os.path.join(APP.config["GIT_FOLDER"], + repo.path)) if branchname and not branchname in repo_obj.listall_branches(): flask.abort(404)