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

Side by Side Diff: gclient.py

Issue 113656: Fix the print_error parsing, which caused spurious errors on gcl usage. (Closed)
Patch Set: Created 11 years, 7 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 | « no previous file | 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 # 2 #
3 # Copyright 2008 Google Inc. All Rights Reserved. 3 # Copyright 2008 Google Inc. All Rights Reserved.
4 # 4 #
5 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License. 6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at 7 # You may obtain a copy of the License at
8 # 8 #
9 # http://www.apache.org/licenses/LICENSE-2.0 9 # http://www.apache.org/licenses/LICENSE-2.0
10 # 10 #
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 The output sent to stdout as a string. 502 The output sent to stdout as a string.
503 """ 503 """
504 c = [SVN_COMMAND] 504 c = [SVN_COMMAND]
505 c.extend(args) 505 c.extend(args)
506 506
507 # *Sigh*: Windows needs shell=True, or else it won't search %PATH% for 507 # *Sigh*: Windows needs shell=True, or else it won't search %PATH% for
508 # the svn.exe executable, but shell=True makes subprocess on Linux fail 508 # the svn.exe executable, but shell=True makes subprocess on Linux fail
509 # when it's called with a list because it only tries to execute the 509 # when it's called with a list because it only tries to execute the
510 # first string ("svn"). 510 # first string ("svn").
511 stderr = None 511 stderr = None
512 if print_error: 512 if not print_error:
513 stderr = subprocess.PIPE 513 stderr = subprocess.PIPE
514 return subprocess.Popen(c, 514 return subprocess.Popen(c,
515 cwd=in_directory, 515 cwd=in_directory,
516 shell=(sys.platform == 'win32'), 516 shell=(sys.platform == 'win32'),
517 stdout=subprocess.PIPE, 517 stdout=subprocess.PIPE,
518 stderr=stderr).communicate()[0] 518 stderr=stderr).communicate()[0]
519 519
520 520
521 def RunSVNAndGetFileList(args, in_directory, file_list): 521 def RunSVNAndGetFileList(args, in_directory, file_list):
522 """Runs svn checkout, update, or status, output to stdout. 522 """Runs svn checkout, update, or status, output to stdout.
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 1722
1723 if "__main__" == __name__: 1723 if "__main__" == __name__:
1724 try: 1724 try:
1725 result = Main(sys.argv) 1725 result = Main(sys.argv)
1726 except Error, e: 1726 except Error, e:
1727 print >> sys.stderr, "Error: %s" % str(e) 1727 print >> sys.stderr, "Error: %s" % str(e)
1728 result = 1 1728 result = 1
1729 sys.exit(result) 1729 sys.exit(result)
1730 1730
1731 # vim: ts=2:sw=2:tw=80:et: 1731 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698