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

Side by Side Diff: presubmit_support.py

Issue 552202: Add a trailing \ when printing filenames for presubmit checks.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 10 years, 11 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 | « presubmit_canned_checks.py ('k') | no next file » | 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/python 1 #!/usr/bin/python
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2006-2009 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 """Enables directory-specific presubmit checks to run at upload and/or commit. 6 """Enables directory-specific presubmit checks to run at upload and/or commit.
7 """ 7 """
8 8
9 __version__ = '1.3.4' 9 __version__ = '1.3.4'
10 10
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 """Writes this result to the output stream. 91 """Writes this result to the output stream.
92 92
93 Args: 93 Args:
94 output_stream: Where to write 94 output_stream: Where to write
95 95
96 Returns: 96 Returns:
97 True if execution may continue, False otherwise. 97 True if execution may continue, False otherwise.
98 """ 98 """
99 output_stream.write(self._message) 99 output_stream.write(self._message)
100 output_stream.write('\n') 100 output_stream.write('\n')
101 for item in self._items: 101 if len(self._items) > 0:
102 output_stream.write(' %s\n' % str(item)) 102 output_stream.write(' ' + ' \\\n '.join(map(str, self._items)) + '\n')
103 if self._long_text: 103 if self._long_text:
104 output_stream.write('\n***************\n%s\n***************\n' % 104 output_stream.write('\n***************\n%s\n***************\n' %
105 self._long_text) 105 self._long_text)
106 106
107 if self.ShouldPrompt() and may_prompt: 107 if self.ShouldPrompt() and may_prompt:
108 if not PromptYesNo(input_stream, output_stream, 108 if not PromptYesNo(input_stream, output_stream,
109 'Are you sure you want to continue? (y/N): '): 109 'Are you sure you want to continue? (y/N): '):
110 return False 110 return False
111 111
112 return not self.IsFatal() 112 return not self.IsFatal()
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 options.commit, 1048 options.commit,
1049 options.verbose, 1049 options.verbose,
1050 sys.stdout, 1050 sys.stdout,
1051 sys.stdin, 1051 sys.stdin,
1052 options.default_presubmit, 1052 options.default_presubmit,
1053 options.may_prompt) 1053 options.may_prompt)
1054 1054
1055 1055
1056 if __name__ == '__main__': 1056 if __name__ == '__main__':
1057 sys.exit(Main(sys.argv)) 1057 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « presubmit_canned_checks.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698