Mercurial > hg > CommitWatcher
diff commitwatcher/store.py @ 20:a8e21cfda5fe
wip
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sun, 29 Sep 2013 20:23:51 -0700 |
parents | 883c88b13142 |
children | be7090ee7738 |
line wrap: on
line diff
--- a/commitwatcher/store.py Sat Sep 28 20:33:17 2013 -0700 +++ b/commitwatcher/store.py Sun Sep 29 20:23:51 2013 -0700 @@ -15,11 +15,23 @@ def paths(self, *commits): """return all paths touched for a given commit""" + def ancestry(self, path): + sep = '/' # unix/url-style separators + path = path.split('/') + paths = [] + while path: + paths.append(sep.join(path)) + path.pop() + return paths + class MemoryStore(CommitStore): """store in volatile memory""" # volatile! + def __init__(self): + self.path_to_commit = {} + def add(self, commit): raise NotImplementedError() @@ -27,3 +39,9 @@ """ return touched by commits """ + + paths = set() + for commit in commits: + for f in commit.files: + + raise NotImplementedError