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 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2387 | 2387 |
2388 # Keep a separate copy for the commit message, because the commit message | 2388 # Keep a separate copy for the commit message, because the commit message |
2389 # contains the link to the Rietveld issue, while the Rietveld message contains | 2389 # contains the link to the Rietveld issue, while the Rietveld message contains |
2390 # the commit viewvc url. | 2390 # the commit viewvc url. |
2391 # Keep a separate copy for the commit message. | 2391 # Keep a separate copy for the commit message. |
2392 if cl.GetIssue(): | 2392 if cl.GetIssue(): |
2393 change_desc.update_reviewers(cl.GetApprovingReviewers()) | 2393 change_desc.update_reviewers(cl.GetApprovingReviewers()) |
2394 | 2394 |
2395 commit_desc = ChangeDescription(change_desc.description) | 2395 commit_desc = ChangeDescription(change_desc.description) |
2396 if cl.GetIssue(): | 2396 if cl.GetIssue(): |
2397 commit_desc.append_footer('Review URL: %s' % cl.GetIssueURL()) | 2397 # Xcode won't linkify this URL unless there is a non-whitespace character |
| 2398 # after it. Add a period on a new line to circumvent this. |
| 2399 commit_desc.append_footer('Review URL: %s.' % cl.GetIssueURL()) |
2398 if options.contributor: | 2400 if options.contributor: |
2399 commit_desc.append_footer('Patch from %s.' % options.contributor) | 2401 commit_desc.append_footer('Patch from %s.' % options.contributor) |
2400 | 2402 |
2401 print('Description:') | 2403 print('Description:') |
2402 print(commit_desc.description) | 2404 print(commit_desc.description) |
2403 | 2405 |
2404 branches = [merge_base, cl.GetBranchRef()] | 2406 branches = [merge_base, cl.GetBranchRef()] |
2405 if not options.force: | 2407 if not options.force: |
2406 print_stats(options.similarity, options.find_copies, branches) | 2408 print_stats(options.similarity, options.find_copies, branches) |
2407 | 2409 |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3370 if __name__ == '__main__': | 3372 if __name__ == '__main__': |
3371 # These affect sys.stdout so do it outside of main() to simplify mocks in | 3373 # These affect sys.stdout so do it outside of main() to simplify mocks in |
3372 # unit testing. | 3374 # unit testing. |
3373 fix_encoding.fix_encoding() | 3375 fix_encoding.fix_encoding() |
3374 colorama.init() | 3376 colorama.init() |
3375 try: | 3377 try: |
3376 sys.exit(main(sys.argv[1:])) | 3378 sys.exit(main(sys.argv[1:])) |
3377 except KeyboardInterrupt: | 3379 except KeyboardInterrupt: |
3378 sys.stderr.write('interrupted\n') | 3380 sys.stderr.write('interrupted\n') |
3379 sys.exit(1) | 3381 sys.exit(1) |
OLD | NEW |