| OLD | NEW |
| 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2009 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 optparse | 5 import optparse |
| 6 import os | 6 import os |
| 7 import re | 7 import re |
| 8 import subprocess | 8 import subprocess |
| 9 import sys | 9 import sys |
| 10 import webbrowser | 10 import webbrowser |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 deleteRevision(url, revision) | 464 deleteRevision(url, revision) |
| 465 elif options.revert: | 465 elif options.revert: |
| 466 action = "Revert" | 466 action = "Revert" |
| 467 if options.branch: | 467 if options.branch: |
| 468 url = BRANCH_URL.replace("$branch", options.branch) | 468 url = BRANCH_URL.replace("$branch", options.branch) |
| 469 checkoutRevision(url, revision, url, True) | 469 checkoutRevision(url, revision, url, True) |
| 470 revertRevision(url, revision) | 470 revertRevision(url, revision) |
| 471 revertExportRevision(url, revision) | 471 revertExportRevision(url, revision) |
| 472 | 472 |
| 473 # Check the base url so we actually find the author who made the change | 473 # Check the base url so we actually find the author who made the change |
| 474 author = getAuthor(TRUNK_URL, revision) | 474 author = getAuthor(url, revision) |
| 475 | 475 |
| 476 filename = str(revision)+".txt" | 476 filename = str(revision)+".txt" |
| 477 out = open(filename,"w") | 477 out = open(filename,"w") |
| 478 out.write(action +" " + str(revision) + " - ") | 478 out.write(action +" " + str(revision) + " - ") |
| 479 out.write(getRevisionLog(url, revision)) | 479 out.write(getRevisionLog(url, revision)) |
| 480 if (author): | 480 if (author): |
| 481 out.write("TBR=" + author) | 481 out.write("TBR=" + author) |
| 482 out.close() | 482 out.close() |
| 483 | 483 |
| 484 change_cmd = 'change ' + str(revision) + " " + filename | 484 change_cmd = 'change ' + str(revision) + " " + filename |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 | 533 |
| 534 if not options.merge and not options.revert: | 534 if not options.merge and not options.revert: |
| 535 option_parser.error("You need at least --merge or --revert") | 535 option_parser.error("You need at least --merge or --revert") |
| 536 sys.exit(1) | 536 sys.exit(1) |
| 537 | 537 |
| 538 if options.merge and not options.branch: | 538 if options.merge and not options.branch: |
| 539 option_parser.error("--merge requires a --branch") | 539 option_parser.error("--merge requires a --branch") |
| 540 sys.exit(1) | 540 sys.exit(1) |
| 541 | 541 |
| 542 sys.exit(main(options, args)) | 542 sys.exit(main(options, args)) |
| OLD | NEW |