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

Side by Side Diff: gclient.py

Issue 1847783002: Multiple improvements to windows bash integration. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Add direct mode and unbuffered Created 4 years, 8 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
« no previous file with comments | « depot-tools-auth.py ('k') | git-bash » ('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 """Meta checkout manager supporting both Subversion and GIT.""" 6 """Meta checkout manager supporting both Subversion and GIT."""
7 # Files 7 # Files
8 # .gclient : Current client configuration, written by 'config' command. 8 # .gclient : Current client configuration, written by 'config' command.
9 # Format is a Python script defining 'solutions', a list whose 9 # Format is a Python script defining 'solutions', a list whose
10 # entries each are maps binding the strings "name" and "url" 10 # entries each are maps binding the strings "name" and "url"
(...skipping 2285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2296 sys.version.split(' ', 1)[0], 2296 sys.version.split(' ', 1)[0],
2297 file=sys.stderr) 2297 file=sys.stderr)
2298 return 2 2298 return 2
2299 if not sys.executable: 2299 if not sys.executable:
2300 print( 2300 print(
2301 '\nPython cannot find the location of it\'s own executable.\n', 2301 '\nPython cannot find the location of it\'s own executable.\n',
2302 file=sys.stderr) 2302 file=sys.stderr)
2303 return 2 2303 return 2
2304 fix_encoding.fix_encoding() 2304 fix_encoding.fix_encoding()
2305 disable_buffering() 2305 disable_buffering()
2306 colorama.init() 2306 colorama.init(wrap="TERM" not in os.environ)
2307 dispatcher = subcommand.CommandDispatcher(__name__) 2307 dispatcher = subcommand.CommandDispatcher(__name__)
2308 try: 2308 try:
2309 return dispatcher.execute(OptionParser(), argv) 2309 return dispatcher.execute(OptionParser(), argv)
2310 except KeyboardInterrupt: 2310 except KeyboardInterrupt:
2311 gclient_utils.GClientChildren.KillAllRemainingChildren() 2311 gclient_utils.GClientChildren.KillAllRemainingChildren()
2312 raise 2312 raise
2313 except (gclient_utils.Error, subprocess2.CalledProcessError) as e: 2313 except (gclient_utils.Error, subprocess2.CalledProcessError) as e:
2314 print('Error: %s' % str(e), file=sys.stderr) 2314 print('Error: %s' % str(e), file=sys.stderr)
2315 return 1 2315 return 1
2316 finally: 2316 finally:
2317 gclient_utils.PrintWarnings() 2317 gclient_utils.PrintWarnings()
2318 return 0 2318 return 0
2319 2319
2320 2320
2321 if '__main__' == __name__: 2321 if '__main__' == __name__:
2322 try: 2322 try:
2323 sys.exit(main(sys.argv[1:])) 2323 sys.exit(main(sys.argv[1:]))
2324 except KeyboardInterrupt: 2324 except KeyboardInterrupt:
2325 sys.stderr.write('interrupted\n') 2325 sys.stderr.write('interrupted\n')
2326 sys.exit(1) 2326 sys.exit(1)
2327 2327
2328 # vim: ts=2:sw=2:tw=80:et: 2328 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « depot-tools-auth.py ('k') | git-bash » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698