Index: appengine/findit/common/dependency.py |
diff --git a/appengine/findit/common/dependency.py b/appengine/findit/common/dependency.py |
index 7e6812d9d46efad0cc55bb66ad2f22eba22d39cf..b29264ff709a7fddcd41ab8cd63c925c63ddfa13 100644 |
--- a/appengine/findit/common/dependency.py |
+++ b/appengine/findit/common/dependency.py |
@@ -2,10 +2,11 @@ |
# Use of this source code is governed by a BSD-style license that can be |
# found in the LICENSE file. |
+import collections |
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 +33,15 @@ class Dependency(object): |
'deps_file': self.deps_file, |
'children': children_dict, |
} |
+ |
+ |
+class DependencyRoll(collections.namedtuple( |
+ 'DependencyRoll', ('path', 'repo_url', 'old_revision', 'new_revision'))): |
+ """Represents a dependency roll (revision update) in chromium. |
+ |
+ Note: It is possible that the DEPS roll is a revert so that |new_revision| is |
+ actually older than |old_revision| in the dependency. |
+ """ |
+ |
+ def ToDict(self): |
+ return self._asdict() |