Пример #1
0
 def commit(self, id=None):
     if not id:
         raise Exception("No ID hash specified.")
     
     c.commit = self.repo_obj.commit(id)
     c.formats = g.formats
     c.repo_name = self.repo_name.split('/')[-1].rstrip('.git')
     return render("repository/commit.tmpl")
Пример #2
0
 def tree(self, path=""):
     id = request.params.get('id', 'master')
     obj = self.repo_obj.tree(id)
     
     if path:
         path = path.rstrip('/')
         for folder in path.split('/'):
             obj = obj.get(folder)
     
     c.path = path
     c.id = id
     if isinstance(obj, Blob):
         c.blob = obj
         return render('repository/blob.tmpl')
     else:
         c.tree = obj
         return render('repository/tree.tmpl')
Пример #3
0
 def index(self):
     c.repos = g.repos
     return render("list/index.tmpl")
Пример #4
0
 def summary(self):
     c.repo_obj = self.repo_obj
     return render("repository/summary.tmpl")