Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: git_cl.py

Issue 10827059: Remove autogeneration of TEST= and automated check (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 import json 10 import json
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 # This will displayed on the codereview site. 676 # This will displayed on the codereview site.
677 # The first line will also be used as the subject of the review. 677 # The first line will also be used as the subject of the review.
678 """ 678 """
679 content += self.description 679 content += self.description
680 if ('\nR=' not in self.description and 680 if ('\nR=' not in self.description and
681 '\nTBR=' not in self.description and 681 '\nTBR=' not in self.description and
682 self.reviewers): 682 self.reviewers):
683 content += '\nR=' + self.reviewers 683 content += '\nR=' + self.reviewers
684 if '\nBUG=' not in self.description: 684 if '\nBUG=' not in self.description:
685 content += '\nBUG=' 685 content += '\nBUG='
686 if '\nTEST=' not in self.description:
687 content += '\nTEST='
688 content = content.rstrip('\n') + '\n' 686 content = content.rstrip('\n') + '\n'
689 content = gclient_utils.RunEditor(content, True) 687 content = gclient_utils.RunEditor(content, True)
690 if not content: 688 if not content:
691 DieWithError('Running editor failed') 689 DieWithError('Running editor failed')
692 content = re.compile(r'^#.*$', re.MULTILINE).sub('', content).strip() 690 content = re.compile(r'^#.*$', re.MULTILINE).sub('', content).strip()
693 if not content.strip(): 691 if not content.strip():
694 DieWithError('No CL description, aborting') 692 DieWithError('No CL description, aborting')
695 self.description = content 693 self.description = content
696 694
697 def ParseDescription(self): 695 def ParseDescription(self):
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 1602 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
1605 1603
1606 # Not a known command. Default to help. 1604 # Not a known command. Default to help.
1607 GenUsage(parser, 'help') 1605 GenUsage(parser, 'help')
1608 return CMDhelp(parser, argv) 1606 return CMDhelp(parser, argv)
1609 1607
1610 1608
1611 if __name__ == '__main__': 1609 if __name__ == '__main__':
1612 fix_encoding.fix_encoding() 1610 fix_encoding.fix_encoding()
1613 sys.exit(main(sys.argv[1:])) 1611 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698