From 6dd1b4e633d3fdd2be37b4bcc2244339a6c9a5c8 Mon Sep 17 00:00:00 2001 From: Mathieu Bridon Date: Mar 19 2014 10:24:16 +0000 Subject: View a tree from the DB repo --- diff --git a/progit/app.py b/progit/app.py index f897c9b..30fb8f1 100644 --- a/progit/app.py +++ b/progit/app.py @@ -392,10 +392,13 @@ def view_commit(repo, commitid): def view_tree(repo, identifier=None): """ Render the tree of the 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 identifier in repo_obj.listall_branches(): branchname = identifier