Mercurial > hg > CommitWatcher
diff commitwatcher/commit.py @ 43:ef90a853afd1
stubbing
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 06 Nov 2013 22:58:07 -0800 |
parents | 4c53f4cc6ffe |
children | 4f8fe143b977 |
line wrap: on
line diff
--- a/commitwatcher/commit.py Tue Nov 05 03:03:06 2013 -0800 +++ b/commitwatcher/commit.py Wed Nov 06 22:58:07 2013 -0800 @@ -4,9 +4,19 @@ class Commit(object): - def __init__(self, message, datetime, author, paths, revision): + 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 +