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

Side by Side Diff: gclient_utils.py

Issue 3435010: Add a nice message for cygwin users, telling them to rebase when necessary. (Closed)
Patch Set: I was confused Created 10 years, 3 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 # Copyright 2009 Google Inc. All Rights Reserved. 1 # Copyright 2009 Google Inc. All Rights Reserved.
2 # 2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); 3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License. 4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at 5 # You may obtain a copy of the License at
6 # 6 #
7 # http://www.apache.org/licenses/LICENSE-2.0 7 # http://www.apache.org/licenses/LICENSE-2.0
8 # 8 #
9 # Unless required by applicable law or agreed to in writing, software 9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, 10 # distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 logging.debug(u'%s, cwd=%s' % (u' '.join(args), kwargs.get('cwd', ''))) 66 logging.debug(u'%s, cwd=%s' % (u' '.join(args), kwargs.get('cwd', '')))
67 if not 'env' in kwargs: 67 if not 'env' in kwargs:
68 # It's easier to parse the stdout if it is always in English. 68 # It's easier to parse the stdout if it is always in English.
69 kwargs['env'] = os.environ.copy() 69 kwargs['env'] = os.environ.copy()
70 kwargs['env']['LANGUAGE'] = 'en' 70 kwargs['env']['LANGUAGE'] = 'en'
71 if not 'shell' in kwargs: 71 if not 'shell' in kwargs:
72 # *Sigh*: Windows needs shell=True, or else it won't search %PATH% for the 72 # *Sigh*: Windows needs shell=True, or else it won't search %PATH% for the
73 # executable, but shell=True makes subprocess on Linux fail when it's called 73 # executable, but shell=True makes subprocess on Linux fail when it's called
74 # with a list because it only tries to execute the first item in the list. 74 # with a list because it only tries to execute the first item in the list.
75 kwargs['shell'] = (sys.platform=='win32') 75 kwargs['shell'] = (sys.platform=='win32')
76 return subprocess.Popen(args, **kwargs) 76 try:
77 return subprocess.Popen(args, **kwargs)
78 except OSError, e:
79 if e.errno == errno.EAGAIN and sys.platform == 'cygwin':
80 raise Error(
81 'Visit '
82 'http://code.google.com/p/chromium/wiki/CygwinDllRemappingFailure to '
83 'learn how to fix this error; you need to rebase your cygwin dlls')
84 raise
77 85
78 86
79 def CheckCall(command, cwd=None, print_error=True): 87 def CheckCall(command, cwd=None, print_error=True):
80 """Similar subprocess.check_call() but redirects stdout and 88 """Similar subprocess.check_call() but redirects stdout and
81 returns (stdout, stderr). 89 returns (stdout, stderr).
82 90
83 Works on python 2.4 91 Works on python 2.4
84 """ 92 """
85 try: 93 try:
86 stderr = None 94 stderr = None
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 logging.info('Caught exception in thread %s' % self.item.name) 647 logging.info('Caught exception in thread %s' % self.item.name)
640 logging.info(str(sys.exc_info())) 648 logging.info(str(sys.exc_info()))
641 work_queue.exceptions.put(sys.exc_info()) 649 work_queue.exceptions.put(sys.exc_info())
642 logging.info('Task %s done' % self.item.name) 650 logging.info('Task %s done' % self.item.name)
643 651
644 work_queue.ready_cond.acquire() 652 work_queue.ready_cond.acquire()
645 try: 653 try:
646 work_queue.ready_cond.notifyAll() 654 work_queue.ready_cond.notifyAll()
647 finally: 655 finally:
648 work_queue.ready_cond.release() 656 work_queue.ready_cond.release()
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