| 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 from __future__ import print_function | 7 from __future__ import print_function |
| 8 | 8 |
| 9 import errno | 9 import errno |
| 10 import logging | 10 import logging |
| 11 import os | 11 import os |
| 12 import posixpath | 12 import posixpath |
| 13 import re | 13 import re |
| 14 import sys | 14 import sys |
| 15 import tempfile | 15 import tempfile |
| 16 import traceback | 16 import traceback |
| 17 import urlparse | 17 import urlparse |
| 18 | 18 |
| 19 import download_from_google_storage | 19 import download_from_google_storage |
| 20 import gclient_utils | 20 import gclient_utils |
| 21 import git_cache | 21 import git_cache |
| 22 import scm | 22 import scm |
| 23 import shutil | 23 import shutil |
| 24 import subprocess2 | 24 import subprocess2 |
| 25 | 25 |
| 26 | 26 |
| 27 THIS_FILE_PATH = os.path.abspath(__file__) | 27 THIS_FILE_PATH = os.path.abspath(__file__) |
| 28 | 28 |
| 29 GSUTIL_DEFAULT_PATH = os.path.join( | 29 GSUTIL_DEFAULT_PATH = os.path.join( |
| 30 os.path.dirname(os.path.abspath(__file__)), | 30 os.path.dirname(os.path.abspath(__file__)), 'gsutil.py') |
| 31 'third_party', 'gsutil', 'gsutil') | |
| 32 | 31 |
| 33 CHROMIUM_SRC_URL = 'https://chromium.googlesource.com/chromium/src.git' | 32 CHROMIUM_SRC_URL = 'https://chromium.googlesource.com/chromium/src.git' |
| 34 class DiffFiltererWrapper(object): | 33 class DiffFiltererWrapper(object): |
| 35 """Simple base class which tracks which file is being diffed and | 34 """Simple base class which tracks which file is being diffed and |
| 36 replaces instances of its file name in the original and | 35 replaces instances of its file name in the original and |
| 37 working copy lines of the svn/git diff output.""" | 36 working copy lines of the svn/git diff output.""" |
| 38 index_string = None | 37 index_string = None |
| 39 original_prefix = "--- " | 38 original_prefix = "--- " |
| 40 working_prefix = "+++ " | 39 working_prefix = "+++ " |
| 41 | 40 |
| (...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1603 new_command.append('--force') | 1602 new_command.append('--force') |
| 1604 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1603 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1605 new_command.extend(('--accept', 'theirs-conflict')) | 1604 new_command.extend(('--accept', 'theirs-conflict')) |
| 1606 elif options.manually_grab_svn_rev: | 1605 elif options.manually_grab_svn_rev: |
| 1607 new_command.append('--force') | 1606 new_command.append('--force') |
| 1608 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1607 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1609 new_command.extend(('--accept', 'postpone')) | 1608 new_command.extend(('--accept', 'postpone')) |
| 1610 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1609 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1611 new_command.extend(('--accept', 'postpone')) | 1610 new_command.extend(('--accept', 'postpone')) |
| 1612 return new_command | 1611 return new_command |
| OLD | NEW |