| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Rolls DEPS controlled dependency. | 6 """Rolls DEPS controlled dependency. |
| 7 | 7 |
| 8 Works only with git checkout and git dependencies. Currently this | 8 Works only with git checkout and git dependencies. Currently this |
| 9 script will always roll to the tip of to origin/master. | 9 script will always roll to the tip of to origin/master. |
| 10 """ | 10 """ |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 upstream_url = upstream_url[:-len('.git')] | 56 upstream_url = upstream_url[:-len('.git')] |
| 57 return '%s/compare/%s...%s' % (upstream_url, head[:12], master[:12]) | 57 return '%s/compare/%s...%s' % (upstream_url, head[:12], master[:12]) |
| 58 return None | 58 return None |
| 59 | 59 |
| 60 | 60 |
| 61 def should_show_log(upstream_url): | 61 def should_show_log(upstream_url): |
| 62 """Returns True if a short log should be included in the tree.""" | 62 """Returns True if a short log should be included in the tree.""" |
| 63 # Skip logs for very active projects. | 63 # Skip logs for very active projects. |
| 64 if upstream_url.endswith(( | 64 if upstream_url.endswith(( |
| 65 '/angle/angle.git', | 65 '/angle/angle.git', |
| 66 '/catapult-project/catapult.git', | |
| 67 '/v8/v8.git')): | 66 '/v8/v8.git')): |
| 68 return False | 67 return False |
| 69 if 'webrtc' in upstream_url: | 68 if 'webrtc' in upstream_url: |
| 70 return False | 69 return False |
| 71 return True | 70 return True |
| 72 | 71 |
| 73 | 72 |
| 74 def roll(root, deps_dir, roll_to, key, reviewers, bug, no_log, log_limit, | 73 def roll(root, deps_dir, roll_to, key, reviewers, bug, no_log, log_limit, |
| 75 ignore_dirty_tree=False): | 74 ignore_dirty_tree=False): |
| 76 deps = os.path.join(root, 'DEPS') | 75 deps = os.path.join(root, 'DEPS') |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 216 |
| 218 except Error as e: | 217 except Error as e: |
| 219 sys.stderr.write('error: %s\n' % e) | 218 sys.stderr.write('error: %s\n' % e) |
| 220 return 2 if isinstance(e, AlreadyRolledError) else 1 | 219 return 2 if isinstance(e, AlreadyRolledError) else 1 |
| 221 | 220 |
| 222 return 0 | 221 return 0 |
| 223 | 222 |
| 224 | 223 |
| 225 if __name__ == '__main__': | 224 if __name__ == '__main__': |
| 226 sys.exit(main()) | 225 sys.exit(main()) |
| OLD | NEW |