Index: appengine/findit/common/dependency.py |
diff --git a/appengine/findit/common/dependency.py b/appengine/findit/common/dependency.py |
index 7e6812d9d46efad0cc55bb66ad2f22eba22d39cf..e3216ca0c387657b4884c3cc968d878aa28813f1 100644 |
--- a/appengine/findit/common/dependency.py |
+++ b/appengine/findit/common/dependency.py |
@@ -4,8 +4,8 @@ |
class Dependency(object): |
- """Represent a dependency in Chrome, like blink, v8, pdfium, etc.""" |
- def __init__(self, path, repo_url, revision, deps_file): |
+ """Represents a dependency in Chrome, like blink, v8, pdfium, etc.""" |
+ def __init__(self, path, repo_url, revision, deps_file='DEPS'): |
self.path = path |
self.repo_url = repo_url |
self.revision = revision |
@@ -32,3 +32,22 @@ class Dependency(object): |
'deps_file': self.deps_file, |
'children': children_dict, |
} |
+ |
+ |
+class DependencyRoll(object): |
+ """Represents a dependency roll (revision update) in chromium.""" |
+ def __init__(self, path, repo_url, old_revision, new_revision): |
+ # Note: It is possible that the DEPS roll is a revert so that |new_revision| |
+ # is actually older than |old_revision| in the dependency. |
+ self.path = path |
+ self.repo_url = repo_url |
+ self.old_revision = old_revision |
+ self.new_revision = new_revision |
+ |
+ def ToDict(self): |
+ return { |
+ 'path': self.path, |
+ 'repo_url': self.repo_url, |
+ 'old_revision': self.old_revision, |
+ 'new_revision': self.new_revision, |
+ } |
qyearsley
2015/05/29 23:14:33
Classes like this could also be made shorter by be
stgao
2015/05/30 00:21:05
That's a good idea!
Done.
|