| OLD | NEW |
| 1 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """SCM-specific utility classes.""" | 5 """SCM-specific utility classes.""" |
| 6 | 6 |
| 7 import cStringIO | 7 import cStringIO |
| 8 import glob | 8 import glob |
| 9 import os | 9 import os |
| 10 import re | 10 import re |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 # directory. | 452 # directory. |
| 453 if len(file_list) == previous_list_len: | 453 if len(file_list) == previous_list_len: |
| 454 for x in failure: | 454 for x in failure: |
| 455 if ('502 Bad Gateway' in x or | 455 if ('502 Bad Gateway' in x or |
| 456 'svn: REPORT of \'/svn/!svn/vcc/default\': 200 OK' in x): | 456 'svn: REPORT of \'/svn/!svn/vcc/default\': 200 OK' in x): |
| 457 # No file were checked out, so make sure the directory is | 457 # No file were checked out, so make sure the directory is |
| 458 # deleted in case it's messed up and try again. | 458 # deleted in case it's messed up and try again. |
| 459 # Warning: It's bad, it assumes args[2] is the directory | 459 # Warning: It's bad, it assumes args[2] is the directory |
| 460 # argument. | 460 # argument. |
| 461 if os.path.isdir(args[2]): | 461 if os.path.isdir(args[2]): |
| 462 chromium_utils.RemoveDirectory(args[2]) | 462 gclient_utils.RemoveDirectory(args[2]) |
| 463 break | 463 break |
| 464 else: | 464 else: |
| 465 # No known svn error was found, bail out. | 465 # No known svn error was found, bail out. |
| 466 raise | 466 raise |
| 467 else: | 467 else: |
| 468 # Progress was made, convert to update since an aborted checkout | 468 # Progress was made, convert to update since an aborted checkout |
| 469 # is now an update. | 469 # is now an update. |
| 470 args = ['update'] + args[1:] | 470 args = ['update'] + args[1:] |
| 471 else: | 471 else: |
| 472 # It was an update or export. | 472 # It was an update or export. |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 915 if not SVN.current_version: | 915 if not SVN.current_version: |
| 916 SVN.current_version = SVN.Capture(['--version']).split()[2] | 916 SVN.current_version = SVN.Capture(['--version']).split()[2] |
| 917 current_version_list = map(only_int, SVN.current_version.split('.')) | 917 current_version_list = map(only_int, SVN.current_version.split('.')) |
| 918 for min_ver in map(int, min_version.split('.')): | 918 for min_ver in map(int, min_version.split('.')): |
| 919 ver = current_version_list.pop(0) | 919 ver = current_version_list.pop(0) |
| 920 if ver < min_ver: | 920 if ver < min_ver: |
| 921 return (False, SVN.current_version) | 921 return (False, SVN.current_version) |
| 922 elif ver > min_ver: | 922 elif ver > min_ver: |
| 923 return (True, SVN.current_version) | 923 return (True, SVN.current_version) |
| 924 return (True, SVN.current_version) | 924 return (True, SVN.current_version) |
| OLD | NEW |