| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 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 """Client-side script to send a try job to the try server. It communicates to | 5 """Client-side script to send a try job to the try server. It communicates to |
| 6 the try server by either writting to a svn repository or by directly connecting | 6 the try server by either writting to a svn repository or by directly connecting |
| 7 to the server by HTTP. | 7 to the server by HTTP. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 | 10 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 previous_cwd = os.getcwd() | 133 previous_cwd = os.getcwd() |
| 134 if root is None: | 134 if root is None: |
| 135 os.chdir(gcl.GetRepositoryRoot()) | 135 os.chdir(gcl.GetRepositoryRoot()) |
| 136 else: | 136 else: |
| 137 os.chdir(root) | 137 os.chdir(root) |
| 138 | 138 |
| 139 diff = [] | 139 diff = [] |
| 140 for file in files: | 140 for file in files: |
| 141 # Use svn info output instead of os.path.isdir because the latter fails | 141 # Use svn info output instead of os.path.isdir because the latter fails |
| 142 # when the file is deleted. | 142 # when the file is deleted. |
| 143 if gclient.CaptureSVNInfo(file).get("Node Kind") in ("dir", "directory"): | 143 if gclient_scm.CaptureSVNInfo(file).get("Node Kind") in ("dir", |
| 144 "directory"): |
| 144 continue | 145 continue |
| 145 # If the user specified a custom diff command in their svn config file, | 146 # If the user specified a custom diff command in their svn config file, |
| 146 # then it'll be used when we do svn diff, which we don't want to happen | 147 # then it'll be used when we do svn diff, which we don't want to happen |
| 147 # since we want the unified diff. Using --diff-cmd=diff doesn't always | 148 # since we want the unified diff. Using --diff-cmd=diff doesn't always |
| 148 # work, since they can have another diff executable in their path that | 149 # work, since they can have another diff executable in their path that |
| 149 # gives different line endings. So we use a bogus temp directory as the | 150 # gives different line endings. So we use a bogus temp directory as the |
| 150 # config directory, which gets around these problems. | 151 # config directory, which gets around these problems. |
| 151 if sys.platform.startswith("win"): | 152 if sys.platform.startswith("win"): |
| 152 parent_dir = tempfile.gettempdir() | 153 parent_dir = tempfile.gettempdir() |
| 153 else: | 154 else: |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 if patch_name == 'Unnamed': | 531 if patch_name == 'Unnamed': |
| 531 print "Note: use --name NAME to change the try's name." | 532 print "Note: use --name NAME to change the try's name." |
| 532 except (InvalidScript, NoTryServerAccess), e: | 533 except (InvalidScript, NoTryServerAccess), e: |
| 533 if swallow_exception: | 534 if swallow_exception: |
| 534 return | 535 return |
| 535 print e | 536 print e |
| 536 | 537 |
| 537 | 538 |
| 538 if __name__ == "__main__": | 539 if __name__ == "__main__": |
| 539 TryChange(None, None, False) | 540 TryChange(None, None, False) |
| OLD | NEW |