Chromium Code Reviews| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 248 its upstream branch. | 248 its upstream branch. |
| 249 """ | 249 """ |
| 250 merge_base = self._Capture(['merge-base', 'HEAD', self.remote]) | 250 merge_base = self._Capture(['merge-base', 'HEAD', self.remote]) |
| 251 gclient_utils.CheckCallAndFilter( | 251 gclient_utils.CheckCallAndFilter( |
| 252 ['git', 'diff', merge_base], | 252 ['git', 'diff', merge_base], |
| 253 cwd=self.checkout_path, | 253 cwd=self.checkout_path, |
| 254 filter_fn=GitDiffFilterer(self.relpath).Filter) | 254 filter_fn=GitDiffFilterer(self.relpath).Filter) |
| 255 | 255 |
| 256 def UpdateSubmoduleConfig(self): | 256 def UpdateSubmoduleConfig(self): |
| 257 submod_cmd = ['git', 'config', '-f', '$toplevel/.git/config', | 257 submod_cmd = ['git', 'config', '-f', '$toplevel/.git/config', |
| 258 'submodule.$name.ignore', '||', | |
| 259 'git', 'config', '-f', '$toplevel/.git/config', | |
| 260 'submodule.$name.ignore', 'all'] | 258 'submodule.$name.ignore', 'all'] |
|
Paweł Hajdan Jr.
2014/01/16 17:20:35
Ah, I missed there is still submodule.$name here.
| |
| 261 cmd = ['git', 'submodule', '--quiet', 'foreach', ' '.join(submod_cmd)] | 259 cmd = ['git', 'submodule', '--quiet', 'foreach', ' '.join(submod_cmd)] |
|
Paweł Hajdan Jr.
2014/01/16 03:20:06
Do we still need the git submodule foreach then?
szager1
2014/01/16 05:44:52
Yes, we do; the submodule foreach command is the t
| |
| 262 cmd2 = ['git', 'config', 'diff.ignoreSubmodules', 'all'] | 260 cmd2 = ['git', 'config', 'diff.ignoreSubmodules', 'all'] |
| 263 cmd3 = ['git', 'config', 'branch.autosetupmerge'] | 261 cmd3 = ['git', 'config', 'branch.autosetupmerge'] |
| 264 cmd4 = ['git', 'config', 'fetch.recurseSubmodules', 'false'] | 262 cmd4 = ['git', 'config', 'fetch.recurseSubmodules', 'false'] |
| 265 kwargs = {'cwd': self.checkout_path, | 263 kwargs = {'cwd': self.checkout_path, |
| 266 'print_stdout': False, | 264 'print_stdout': False, |
| 267 'filter_fn': lambda x: None} | 265 'filter_fn': lambda x: None} |
| 268 try: | 266 try: |
| 269 gclient_utils.CheckCallAndFilter(cmd, **kwargs) | 267 gclient_utils.CheckCallAndFilter(cmd, **kwargs) |
| 270 gclient_utils.CheckCallAndFilter(cmd2, **kwargs) | 268 gclient_utils.CheckCallAndFilter(cmd2, **kwargs) |
| 271 except subprocess2.CalledProcessError: | 269 except subprocess2.CalledProcessError: |
| (...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1518 new_command.append('--force') | 1516 new_command.append('--force') |
| 1519 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1517 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1520 new_command.extend(('--accept', 'theirs-conflict')) | 1518 new_command.extend(('--accept', 'theirs-conflict')) |
| 1521 elif options.manually_grab_svn_rev: | 1519 elif options.manually_grab_svn_rev: |
| 1522 new_command.append('--force') | 1520 new_command.append('--force') |
| 1523 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1521 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1524 new_command.extend(('--accept', 'postpone')) | 1522 new_command.extend(('--accept', 'postpone')) |
| 1525 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1523 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1526 new_command.extend(('--accept', 'postpone')) | 1524 new_command.extend(('--accept', 'postpone')) |
| 1527 return new_command | 1525 return new_command |
| OLD | NEW |