| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 """Gclient-specific SCM-specific operations.""" | 5 """Gclient-specific SCM-specific operations.""" |
| 6 | 6 |
| 7 import collections | 7 import collections |
| 8 import logging | 8 import logging |
| 9 import os | 9 import os |
| 10 import posixpath | 10 import posixpath |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 ### SCM abstraction layer | 81 ### SCM abstraction layer |
| 82 | 82 |
| 83 # Factory Method for SCM wrapper creation | 83 # Factory Method for SCM wrapper creation |
| 84 | 84 |
| 85 def GetScmName(url): | 85 def GetScmName(url): |
| 86 if url: | 86 if url: |
| 87 url, _ = gclient_utils.SplitUrlRevision(url) | 87 url, _ = gclient_utils.SplitUrlRevision(url) |
| 88 if (url.startswith('git://') or url.startswith('ssh://') or | 88 if (url.startswith('git://') or url.startswith('ssh://') or |
| 89 url.startswith('git+http://') or url.startswith('git+https://') or | 89 url.startswith('git+http://') or url.startswith('git+https://') or |
| 90 url.endswith('.git')): | 90 url.endswith('.git') or url.startswith('sso://')): |
| 91 return 'git' | 91 return 'git' |
| 92 elif (url.startswith('http://') or url.startswith('https://') or | 92 elif (url.startswith('http://') or url.startswith('https://') or |
| 93 url.startswith('svn://') or url.startswith('svn+ssh://')): | 93 url.startswith('svn://') or url.startswith('svn+ssh://')): |
| 94 return 'svn' | 94 return 'svn' |
| 95 return None | 95 return None |
| 96 | 96 |
| 97 | 97 |
| 98 def CreateSCM(url, root_dir=None, relpath=None): | 98 def CreateSCM(url, root_dir=None, relpath=None): |
| 99 SCM_MAP = { | 99 SCM_MAP = { |
| 100 'svn' : SVNWrapper, | 100 'svn' : SVNWrapper, |
| (...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1539 new_command.append('--force') | 1539 new_command.append('--force') |
| 1540 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1540 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1541 new_command.extend(('--accept', 'theirs-conflict')) | 1541 new_command.extend(('--accept', 'theirs-conflict')) |
| 1542 elif options.manually_grab_svn_rev: | 1542 elif options.manually_grab_svn_rev: |
| 1543 new_command.append('--force') | 1543 new_command.append('--force') |
| 1544 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1544 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1545 new_command.extend(('--accept', 'postpone')) | 1545 new_command.extend(('--accept', 'postpone')) |
| 1546 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1546 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1547 new_command.extend(('--accept', 'postpone')) | 1547 new_command.extend(('--accept', 'postpone')) |
| 1548 return new_command | 1548 return new_command |
| OLD | NEW |