| 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 logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import posixpath | 9 import posixpath |
| 10 import re | 10 import re |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 | 111 |
| 112 # SCMWrapper base class | 112 # SCMWrapper base class |
| 113 | 113 |
| 114 class SCMWrapper(object): | 114 class SCMWrapper(object): |
| 115 """Add necessary glue between all the supported SCM. | 115 """Add necessary glue between all the supported SCM. |
| 116 | 116 |
| 117 This is the abstraction layer to bind to different SCM. | 117 This is the abstraction layer to bind to different SCM. |
| 118 """ | 118 """ |
| 119 nag_timer = 30 | 119 nag_timer = 30 |
| 120 nag_max = 3 | 120 nag_max = 6 |
| 121 | 121 |
| 122 def __init__(self, url=None, root_dir=None, relpath=None): | 122 def __init__(self, url=None, root_dir=None, relpath=None): |
| 123 self.url = url | 123 self.url = url |
| 124 self._root_dir = root_dir | 124 self._root_dir = root_dir |
| 125 if self._root_dir: | 125 if self._root_dir: |
| 126 self._root_dir = self._root_dir.replace('/', os.sep) | 126 self._root_dir = self._root_dir.replace('/', os.sep) |
| 127 self.relpath = relpath | 127 self.relpath = relpath |
| 128 if self.relpath: | 128 if self.relpath: |
| 129 self.relpath = self.relpath.replace('/', os.sep) | 129 self.relpath = self.relpath.replace('/', os.sep) |
| 130 if self.relpath and self._root_dir: | 130 if self.relpath and self._root_dir: |
| (...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1276 new_command.append('--force') | 1276 new_command.append('--force') |
| 1277 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1277 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1278 new_command.extend(('--accept', 'theirs-conflict')) | 1278 new_command.extend(('--accept', 'theirs-conflict')) |
| 1279 elif options.manually_grab_svn_rev: | 1279 elif options.manually_grab_svn_rev: |
| 1280 new_command.append('--force') | 1280 new_command.append('--force') |
| 1281 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1281 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1282 new_command.extend(('--accept', 'postpone')) | 1282 new_command.extend(('--accept', 'postpone')) |
| 1283 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1283 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1284 new_command.extend(('--accept', 'postpone')) | 1284 new_command.extend(('--accept', 'postpone')) |
| 1285 return new_command | 1285 return new_command |
| OLD | NEW |