Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 # Copyright (C) 2008 Evan Martin <martine@danga.com> | 6 # Copyright (C) 2008 Evan Martin <martine@danga.com> |
| 7 | 7 |
| 8 """A git-command for integrating reviews on Rietveld.""" | 8 """A git-command for integrating reviews on Rietveld.""" |
| 9 | 9 |
| 10 from distutils.version import LooseVersion | 10 from distutils.version import LooseVersion |
| (...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1482 if options.target_branch: | 1482 if options.target_branch: |
| 1483 branch = options.target_branch | 1483 branch = options.target_branch |
| 1484 | 1484 |
| 1485 change_desc = ChangeDescription( | 1485 change_desc = ChangeDescription( |
| 1486 options.message or CreateDescriptionFromLog(args)) | 1486 options.message or CreateDescriptionFromLog(args)) |
| 1487 if not change_desc.description: | 1487 if not change_desc.description: |
| 1488 print "Description is empty; aborting." | 1488 print "Description is empty; aborting." |
| 1489 return 1 | 1489 return 1 |
| 1490 if CHANGE_ID not in change_desc.description: | 1490 if CHANGE_ID not in change_desc.description: |
| 1491 AddChangeIdToCommitMessage(options, args) | 1491 AddChangeIdToCommitMessage(options, args) |
| 1492 | |
| 1493 commits = RunGit(['rev-list', '%s/%s..' % (remote, branch)]).splitlines() | |
|
iannucci
2014/04/28 21:02:20
Actually, I think this should be `git_common.get_o
Bernhard Bauer
2014/04/29 08:35:39
The problem is that Gerrit does not know about the
| |
| 1494 if len(commits) > 1: | |
| 1495 print('WARNING: This will upload %d commits. Run the following command ' | |
| 1496 'to see which commits will be uploaded: ' % len(commits)) | |
|
iannucci
2014/04/28 20:59:19
you may also want to advise the potential use of `
Bernhard Bauer
2014/04/29 08:35:39
Done.
FYI, I also have a local patch that will sq
| |
| 1497 print('git log %s/%s..' % (remote, branch)) | |
| 1498 ask_for_data('About to upload; enter to confirm.') | |
| 1499 | |
| 1492 if options.reviewers: | 1500 if options.reviewers: |
| 1493 change_desc.update_reviewers(options.reviewers) | 1501 change_desc.update_reviewers(options.reviewers) |
| 1494 | 1502 |
| 1495 receive_options = [] | 1503 receive_options = [] |
| 1496 cc = cl.GetCCList().split(',') | 1504 cc = cl.GetCCList().split(',') |
| 1497 if options.cc: | 1505 if options.cc: |
| 1498 cc.extend(options.cc) | 1506 cc.extend(options.cc) |
| 1499 cc = filter(None, cc) | 1507 cc = filter(None, cc) |
| 1500 if cc: | 1508 if cc: |
| 1501 receive_options += ['--cc=' + email for email in cc] | 1509 receive_options += ['--cc=' + email for email in cc] |
| (...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2557 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 2565 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
| 2558 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) | 2566 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) |
| 2559 | 2567 |
| 2560 | 2568 |
| 2561 if __name__ == '__main__': | 2569 if __name__ == '__main__': |
| 2562 # These affect sys.stdout so do it outside of main() to simplify mocks in | 2570 # These affect sys.stdout so do it outside of main() to simplify mocks in |
| 2563 # unit testing. | 2571 # unit testing. |
| 2564 fix_encoding.fix_encoding() | 2572 fix_encoding.fix_encoding() |
| 2565 colorama.init() | 2573 colorama.init() |
| 2566 sys.exit(main(sys.argv[1:])) | 2574 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |