Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Unified Diff: appengine/findit/common/dependency.py

Issue 1154593005: [Findit] Add a sub-pipeline to analyze failures caused by DEPS rolls. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Fix url to changes in DEPS roll. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698