Mercurial > hg > CommitWatcher
annotate 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 |
rev | line source |
---|---|
2
4cb3971d9d9d
commitwatcher/__init__.py commitwatcher/agent.py commitwatcher/main.py setup.py commitwatcher/commit.py commitwatcher/store.py mozbasewatcher.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
1 """ |
4cb3971d9d9d
commitwatcher/__init__.py commitwatcher/agent.py commitwatcher/main.py setup.py commitwatcher/commit.py commitwatcher/store.py mozbasewatcher.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
2 commit object model |
4cb3971d9d9d
commitwatcher/__init__.py commitwatcher/agent.py commitwatcher/main.py setup.py commitwatcher/commit.py commitwatcher/store.py mozbasewatcher.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
3 """ |
4cb3971d9d9d
commitwatcher/__init__.py commitwatcher/agent.py commitwatcher/main.py setup.py commitwatcher/commit.py commitwatcher/store.py mozbasewatcher.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
4 |
4cb3971d9d9d
commitwatcher/__init__.py commitwatcher/agent.py commitwatcher/main.py setup.py commitwatcher/commit.py commitwatcher/store.py mozbasewatcher.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
5 class Commit(object): |
4cb3971d9d9d
commitwatcher/__init__.py commitwatcher/agent.py commitwatcher/main.py setup.py commitwatcher/commit.py commitwatcher/store.py mozbasewatcher.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
6 |
43 | 7 def __init__(self, message, datetime, author, files, revision): |
2
4cb3971d9d9d
commitwatcher/__init__.py commitwatcher/agent.py commitwatcher/main.py setup.py commitwatcher/commit.py commitwatcher/store.py mozbasewatcher.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
8 self.message = message |
4cb3971d9d9d
commitwatcher/__init__.py commitwatcher/agent.py commitwatcher/main.py setup.py commitwatcher/commit.py commitwatcher/store.py mozbasewatcher.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
9 self.datetime = datetime |
4cb3971d9d9d
commitwatcher/__init__.py commitwatcher/agent.py commitwatcher/main.py setup.py commitwatcher/commit.py commitwatcher/store.py mozbasewatcher.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
10 self.author= author |
4cb3971d9d9d
commitwatcher/__init__.py commitwatcher/agent.py commitwatcher/main.py setup.py commitwatcher/commit.py commitwatcher/store.py mozbasewatcher.py
Jeff Hammel <jhammel@mozilla.com>
parents:
diff
changeset
|
11 self.paths = paths |
30
4c53f4cc6ffe
commitwatcher/commit.py commitwatcher/store.py
Jeff Hammel <jhammel@mozilla.com>
parents:
20
diff
changeset
|
12 self.revision = revision |
43 | 13 |
14 def ancestry(self, ): | |
15 sep = '/' # unix/url-style separators | |
16 path = path.split('/') | |
17 paths = [] | |
18 while path: | |
19 paths.append(sep.join(path)) | |
20 path.pop() | |
21 return paths | |
22 |