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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 ['git', 'diff', merge_base], | 193 ['git', 'diff', merge_base], |
194 cwd=self.checkout_path, | 194 cwd=self.checkout_path, |
195 filter_fn=GitDiffFilterer(self.relpath).Filter) | 195 filter_fn=GitDiffFilterer(self.relpath).Filter) |
196 | 196 |
197 def UpdateSubmoduleConfig(self): | 197 def UpdateSubmoduleConfig(self): |
198 submod_cmd = ['git', 'config', '-f', '$toplevel/.git/config', | 198 submod_cmd = ['git', 'config', '-f', '$toplevel/.git/config', |
199 'submodule.$name.ignore', '||', | 199 'submodule.$name.ignore', '||', |
200 'git', 'config', '-f', '$toplevel/.git/config', | 200 'git', 'config', '-f', '$toplevel/.git/config', |
201 'submodule.$name.ignore', 'all'] | 201 'submodule.$name.ignore', 'all'] |
202 cmd = ['git', 'submodule', '--quiet', 'foreach', ' '.join(submod_cmd)] | 202 cmd = ['git', 'submodule', '--quiet', 'foreach', ' '.join(submod_cmd)] |
| 203 cmd2 = ['git', 'config', 'diff.ignoreSubmodules', 'all'] |
203 try: | 204 try: |
204 gclient_utils.CheckCallAndFilter( | 205 gclient_utils.CheckCallAndFilter( |
205 cmd, cwd=self.checkout_path, print_stdout=False, | 206 cmd, cwd=self.checkout_path, print_stdout=False, |
206 filter_fn=lambda x: None) | 207 filter_fn=lambda x: None) |
| 208 gclient_utils.CheckCallAndFilter( |
| 209 cmd2, cwd=self.checkout_path, print_stdout=False, |
| 210 filter_fn=lambda x: None) |
207 except subprocess2.CalledProcessError: | 211 except subprocess2.CalledProcessError: |
208 # Not a fatal error, or even very interesting in a non-git-submodule | 212 # Not a fatal error, or even very interesting in a non-git-submodule |
209 # world. So just keep it quiet. | 213 # world. So just keep it quiet. |
210 pass | 214 pass |
211 | 215 |
212 def update(self, options, args, file_list): | 216 def update(self, options, args, file_list): |
213 """Runs git to update or transparently checkout the working copy. | 217 """Runs git to update or transparently checkout the working copy. |
214 | 218 |
215 All updated files will be appended to file_list. | 219 All updated files will be appended to file_list. |
216 | 220 |
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 new_command.append('--force') | 1193 new_command.append('--force') |
1190 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1194 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1191 new_command.extend(('--accept', 'theirs-conflict')) | 1195 new_command.extend(('--accept', 'theirs-conflict')) |
1192 elif options.manually_grab_svn_rev: | 1196 elif options.manually_grab_svn_rev: |
1193 new_command.append('--force') | 1197 new_command.append('--force') |
1194 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1198 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1195 new_command.extend(('--accept', 'postpone')) | 1199 new_command.extend(('--accept', 'postpone')) |
1196 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1200 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1197 new_command.extend(('--accept', 'postpone')) | 1201 new_command.extend(('--accept', 'postpone')) |
1198 return new_command | 1202 return new_command |
OLD | NEW |