| OLD | NEW |
| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 raise CheckCallError(command, kwargs.get('cwd', None), e.errno, None) | 100 raise CheckCallError(command, kwargs.get('cwd', None), e.errno, None) |
| 101 if process.returncode: | 101 if process.returncode: |
| 102 raise CheckCallError(command, kwargs.get('cwd', None), process.returncode, | 102 raise CheckCallError(command, kwargs.get('cwd', None), process.returncode, |
| 103 std_out, std_err) | 103 std_out, std_err) |
| 104 return std_out, std_err | 104 return std_out, std_err |
| 105 | 105 |
| 106 | 106 |
| 107 def SplitUrlRevision(url): | 107 def SplitUrlRevision(url): |
| 108 """Splits url and returns a two-tuple: url, rev""" | 108 """Splits url and returns a two-tuple: url, rev""" |
| 109 if url.startswith('ssh:'): | 109 if url.startswith('ssh:'): |
| 110 # Make sure ssh://test@example.com/test.git@stable works | 110 # Make sure ssh://user-name@example.com/~/test.git@stable works |
| 111 regex = r'(ssh://(?:[\w]+@)?[-\w:\.]+/[-\w\./]+)(?:@(.+))?' | 111 regex = r'(ssh://(?:[-\w]+@)?[-\w:\.]+/[-~\w\./]+)(?:@(.+))?' |
| 112 components = re.search(regex, url).groups() | 112 components = re.search(regex, url).groups() |
| 113 else: | 113 else: |
| 114 components = url.split('@', 1) | 114 components = url.split('@', 1) |
| 115 if len(components) == 1: | 115 if len(components) == 1: |
| 116 components += [None] | 116 components += [None] |
| 117 return tuple(components) | 117 return tuple(components) |
| 118 | 118 |
| 119 | 119 |
| 120 def ParseXML(output): | 120 def ParseXML(output): |
| 121 try: | 121 try: |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 logging.info('Caught exception in thread %s' % self.item.name) | 705 logging.info('Caught exception in thread %s' % self.item.name) |
| 706 logging.info(str(sys.exc_info())) | 706 logging.info(str(sys.exc_info())) |
| 707 work_queue.exceptions.put(sys.exc_info()) | 707 work_queue.exceptions.put(sys.exc_info()) |
| 708 logging.info('Task %s done' % self.item.name) | 708 logging.info('Task %s done' % self.item.name) |
| 709 | 709 |
| 710 work_queue.ready_cond.acquire() | 710 work_queue.ready_cond.acquire() |
| 711 try: | 711 try: |
| 712 work_queue.ready_cond.notifyAll() | 712 work_queue.ready_cond.notifyAll() |
| 713 finally: | 713 finally: |
| 714 work_queue.ready_cond.release() | 714 work_queue.ready_cond.release() |
| OLD | NEW |