OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Update Dartium DEPS automatically. | 3 # Update Dartium DEPS automatically. |
4 | 4 |
5 from datetime import datetime, timedelta | 5 from datetime import datetime, timedelta |
6 import optparse | 6 import optparse |
7 import os | 7 import os |
8 import re | 8 import re |
9 from subprocess import Popen, PIPE | 9 from subprocess import Popen, PIPE |
10 import sys | 10 import sys |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 # | 72 # |
73 # The repo_tag must match the DEPS revision entry. I.e, there must be | 73 # The repo_tag must match the DEPS revision entry. I.e, there must be |
74 # an entry of the form: | 74 # an entry of the form: |
75 # 'dartium_%s_revision' % repo_tag | 75 # 'dartium_%s_revision' % repo_tag |
76 # to roll forward. | 76 # to roll forward. |
77 # | 77 # |
78 # The view_url should be parameterized by revision number. This is | 78 # The view_url should be parameterized by revision number. This is |
79 # used to generated the commit message. | 79 # used to generated the commit message. |
80 REPOSITORY_INFO = { | 80 REPOSITORY_INFO = { |
81 'webkit': ( | 81 'webkit': ( |
82 'http://src.chromium.org/blink/branches/%s', | 82 'https://src.chromium.org/blink/branches/%s', |
83 'http://src.chromium.org/viewvc/blink?view=rev&revision=%s'), | 83 'https://src.chromium.org/viewvc/blink?view=rev&revision=%s'), |
84 'blink': ( | 84 'blink': ( |
85 'http://src.chromium.org/blink/branches/%s', | 85 'https://src.chromium.org/blink/branches/%s', |
86 'http://src.chromium.org/viewvc/blink?view=rev&revision=%s'), | 86 'https://src.chromium.org/viewvc/blink?view=rev&revision=%s'), |
87 'chromium': ( | 87 'chromium': ( |
88 'http://src.chromium.org/chrome/branches/%s', | 88 'https://src.chromium.org/chrome/branches/%s', |
89 'http://src.chromium.org/viewvc/chrome?view=rev&revision=%s'), | 89 'https://src.chromium.org/viewvc/chrome?view=rev&revision=%s'), |
90 } | 90 } |
91 | 91 |
92 REPOSITORIES = REPOSITORY_INFO.keys() | 92 REPOSITORIES = REPOSITORY_INFO.keys() |
93 | 93 |
94 ######################################################################## | 94 ######################################################################## |
95 # Actions | 95 # Actions |
96 ######################################################################## | 96 ######################################################################## |
97 | 97 |
98 def write_file(filename, content): | 98 def write_file(filename, content): |
99 f = open(filename, "w") | 99 f = open(filename, "w") |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 if not options.force: | 261 if not options.force: |
262 print "Ready to push; press Enter to continue or Control-C to abort..." | 262 print "Ready to push; press Enter to continue or Control-C to abort..." |
263 sys.stdin.readline() | 263 sys.stdin.readline() |
264 print run_cmd(['git', 'commit', '-F', 'commit_log.txt']) | 264 print run_cmd(['git', 'commit', '-F', 'commit_log.txt']) |
265 print run_cmd(['git', 'push', repo_branch_parts[0], repo_branch_parts[1]]) | 265 print run_cmd(['git', 'push', repo_branch_parts[0], repo_branch_parts[1]]) |
266 print "Done." | 266 print "Done." |
267 | 267 |
268 | 268 |
269 if '__main__' == __name__: | 269 if '__main__' == __name__: |
270 main() | 270 main() |
OLD | NEW |