| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import collections | 5 import collections |
| 6 | 6 |
| 7 |
| 7 class Dependency(object): | 8 class Dependency(object): |
| 8 """Represents a dependency in Chrome, like blink, v8, pdfium, etc.""" | 9 """Represents a dependency in Chrome, like blink, v8, pdfium, etc.""" |
| 9 def __init__(self, path, repo_url, revision, deps_file='DEPS'): | 10 def __init__(self, path, repo_url, revision, deps_file='DEPS'): |
| 10 self.path = path | 11 self.path = path |
| 11 self.repo_url = repo_url | 12 self.repo_url = repo_url |
| 12 self.revision = revision | 13 self.revision = revision |
| 13 self.deps_file = deps_file | 14 self.deps_file = deps_file |
| 14 self.parent = None | 15 self.parent = None |
| 15 self.children = dict() | 16 self.children = dict() |
| 16 | 17 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 38 class DependencyRoll(collections.namedtuple( | 39 class DependencyRoll(collections.namedtuple( |
| 39 'DependencyRoll', ('path', 'repo_url', 'old_revision', 'new_revision'))): | 40 'DependencyRoll', ('path', 'repo_url', 'old_revision', 'new_revision'))): |
| 40 """Represents a dependency roll (revision update) in chromium. | 41 """Represents a dependency roll (revision update) in chromium. |
| 41 | 42 |
| 42 Note: It is possible that the DEPS roll is a revert so that ``new_revision`` | 43 Note: It is possible that the DEPS roll is a revert so that ``new_revision`` |
| 43 is actually older than ``old_revision`` in the dependency. | 44 is actually older than ``old_revision`` in the dependency. |
| 44 """ | 45 """ |
| 45 | 46 |
| 46 def ToDict(self): | 47 def ToDict(self): |
| 47 return self._asdict() | 48 return self._asdict() |
| OLD | NEW |