view commitwatcher/commit.py @ 45:32cf3d3469c3 default tip

assert
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 07 Nov 2013 14:19:06 -0800
parents 4f8fe143b977
children
line wrap: on
line source

"""
commit object model
"""

class Commit(object):

    def __init__(self, message, datetime, author, files, revision):
        self.message = message
        self.datetime = datetime
        self.author= author
        self.paths = paths
        self.revision = revision

    def ancestry(self, ):
        sep = '/' # unix/url-style separators
        path = path.split('/')
        paths = []
        while path:
            paths.append(sep.join(path))
            path.pop()
        return paths