OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 import errno | 10 import errno |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 if issue: | 526 if issue: |
527 description = self.GetDescription() | 527 description = self.GetDescription() |
528 else: | 528 else: |
529 # If the change was never uploaded, use the log messages of all commits | 529 # If the change was never uploaded, use the log messages of all commits |
530 # up to the branch point, as git cl upload will prefill the description | 530 # up to the branch point, as git cl upload will prefill the description |
531 # with these log messages. | 531 # with these log messages. |
532 description = RunCommand(['git', 'log', '--pretty=format:%s%n%n%b', | 532 description = RunCommand(['git', 'log', '--pretty=format:%s%n%n%b', |
533 '%s...' % (upstream_branch)]).strip() | 533 '%s...' % (upstream_branch)]).strip() |
534 | 534 |
535 if not author: | 535 if not author: |
536 author = RunGit(['config', 'user.email']) | 536 author = RunGit(['config', 'user.email']).strip() |
537 change = presubmit_support.GitChange( | 537 change = presubmit_support.GitChange( |
538 name, | 538 name, |
539 description, | 539 description, |
540 absroot, | 540 absroot, |
541 files, | 541 files, |
542 issue, | 542 issue, |
543 patchset, | 543 patchset, |
544 author) | 544 author) |
545 | 545 |
546 # Apply watchlists on upload. | 546 # Apply watchlists on upload. |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1479 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) | 1479 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) |
1480 | 1480 |
1481 # Not a known command. Default to help. | 1481 # Not a known command. Default to help. |
1482 GenUsage(parser, 'help') | 1482 GenUsage(parser, 'help') |
1483 return CMDhelp(parser, argv) | 1483 return CMDhelp(parser, argv) |
1484 | 1484 |
1485 | 1485 |
1486 if __name__ == '__main__': | 1486 if __name__ == '__main__': |
1487 fix_encoding.fix_encoding() | 1487 fix_encoding.fix_encoding() |
1488 sys.exit(main(sys.argv[1:])) | 1488 sys.exit(main(sys.argv[1:])) |
OLD | NEW |