Commit 140aeae9 authored by Baptiste Mouterde's avatar Baptiste Mouterde Committed by ikoalaz
Browse files

git_storage : add license, comments

parent 40a6c062
......@@ -259,7 +259,7 @@ class CommentsController(BaseController):
# creating a comments_score
if user.id==comment.user_id:
log.debug('user can\'t rate his own comments!')
return msg.call_msg('failure','you can\'t rate your own comment')
return msg.call_msg('failure','you can\'t rate your own comment')
data = {'user': user, 'package_comment': comment, 'value': good}
#testing if the user already vote for this
comment_score = meta.session.query(CommentsScore).filter_by(package_comments_id=comment.id,
......
......@@ -2,13 +2,14 @@
#
# This file is part of debexpo - https://alioth.debian.org/projects/debexpo/
#
# 2012 Baptiste Mouterde <baptiste.mouterde@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
......@@ -29,7 +30,7 @@ from dulwich.objects import Blob, Tree, Commit, parse_timezone
import os
import logging
import pylons
from debexpo.lib.base import request
import shutil
log = logging.getLogger(__name__)
......@@ -37,6 +38,8 @@ log = logging.getLogger(__name__)
fileToIgnore = []
class GitStorage():
#private function
def _ignoreFile(self, dirName, fileName):
"""
used for the copTree stuff
......@@ -71,7 +74,7 @@ class GitStorage():
self.repo.refs["HEAD"] = commit.id
log.debug('commiting')
return commit.id
#init
def __init__(self, path):
#creating the repository
if os.path.isdir(path):
......@@ -216,6 +219,9 @@ class GitStorage():
return result
def getAllCommits(self, id):
"""
return a list of all commits from an id
"""
result = []
commit = self.repo[id]
try:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment