| 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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 in_directory, | 444 in_directory, |
| 445 verbose, | 445 verbose, |
| 446 True, | 446 True, |
| 447 CaptureMatchingLines) | 447 CaptureMatchingLines) |
| 448 except gclient_utils.Error: | 448 except gclient_utils.Error: |
| 449 def IsKnownFailure(): | 449 def IsKnownFailure(): |
| 450 for x in failure: | 450 for x in failure: |
| 451 if (x.startswith('svn: OPTIONS of') or | 451 if (x.startswith('svn: OPTIONS of') or |
| 452 x.startswith('svn: PROPFIND of') or | 452 x.startswith('svn: PROPFIND of') or |
| 453 x.startswith('svn: REPORT of') or | 453 x.startswith('svn: REPORT of') or |
| 454 x.startswith('svn: Unknown hostname')): | 454 x.startswith('svn: Unknown hostname') or |
| 455 x.startswith('svn: Server sent unexpected return value')): |
| 455 return True | 456 return True |
| 456 return False | 457 return False |
| 457 | 458 |
| 458 # Subversion client is really misbehaving with Google Code. | 459 # Subversion client is really misbehaving with Google Code. |
| 459 if args[0] == 'checkout': | 460 if args[0] == 'checkout': |
| 460 # Ensure at least one file was checked out, otherwise *delete* the | 461 # Ensure at least one file was checked out, otherwise *delete* the |
| 461 # directory. | 462 # directory. |
| 462 if len(file_list) == previous_list_len: | 463 if len(file_list) == previous_list_len: |
| 463 if not IsKnownFailure(): | 464 if not IsKnownFailure(): |
| 464 # No known svn error was found, bail out. | 465 # No known svn error was found, bail out. |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 if not SVN.current_version: | 937 if not SVN.current_version: |
| 937 SVN.current_version = SVN.Capture(['--version']).split()[2] | 938 SVN.current_version = SVN.Capture(['--version']).split()[2] |
| 938 current_version_list = map(only_int, SVN.current_version.split('.')) | 939 current_version_list = map(only_int, SVN.current_version.split('.')) |
| 939 for min_ver in map(int, min_version.split('.')): | 940 for min_ver in map(int, min_version.split('.')): |
| 940 ver = current_version_list.pop(0) | 941 ver = current_version_list.pop(0) |
| 941 if ver < min_ver: | 942 if ver < min_ver: |
| 942 return (False, SVN.current_version) | 943 return (False, SVN.current_version) |
| 943 elif ver > min_ver: | 944 elif ver > min_ver: |
| 944 return (True, SVN.current_version) | 945 return (True, SVN.current_version) |
| 945 return (True, SVN.current_version) | 946 return (True, SVN.current_version) |
| OLD | NEW |