OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2014 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 """This scripts takes the path to a dep and an svn revision, and updates the | 6 """This scripts takes the path to a dep and an svn revision, and updates the |
7 parent repo's DEPS file with the corresponding git revision. Sample invocation: | 7 parent repo's DEPS file with the corresponding git revision. Sample invocation: |
8 | 8 |
9 [chromium/src]$ roll-dep third_party/WebKit 12345 | 9 [chromium/src]$ roll-dep third_party/WebKit 12345 |
10 | 10 |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 'verification.' % revision) | 391 'verification.' % revision) |
392 git_rev = revision | 392 git_rev = revision |
393 comment = None | 393 comment = None |
394 else: | 394 else: |
395 (git_rev, svn_rev) = get_git_revision(dep_path, revision) | 395 (git_rev, svn_rev) = get_git_revision(dep_path, revision) |
396 comment = ('from svn revision %s' % svn_rev) if svn_rev else None | 396 comment = ('from svn revision %s' % svn_rev) if svn_rev else None |
397 assert git_rev, 'Could not find git revision matching %s.' % revision | 397 assert git_rev, 'Could not find git revision matching %s.' % revision |
398 return update_deps(deps_file, dep_path, dep_name, git_rev, comment) | 398 return update_deps(deps_file, dep_path, dep_name, git_rev, comment) |
399 | 399 |
400 if __name__ == '__main__': | 400 if __name__ == '__main__': |
401 sys.exit(main(sys.argv[1:])) | 401 try: |
| 402 sys.exit(main(sys.argv[1:])) |
| 403 except KeyboardInterrupt: |
| 404 sys.stderr.write('interrupted\n') |
| 405 sys.exit(1) |
OLD | NEW |