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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 self.UpdateSubmoduleConfig() | 283 self.UpdateSubmoduleConfig() |
284 files = self._Capture(['ls-files']).splitlines() | 284 files = self._Capture(['ls-files']).splitlines() |
285 file_list.extend([os.path.join(self.checkout_path, f) for f in files]) | 285 file_list.extend([os.path.join(self.checkout_path, f) for f in files]) |
286 if not verbose: | 286 if not verbose: |
287 # Make the output a little prettier. It's nice to have some whitespace | 287 # Make the output a little prettier. It's nice to have some whitespace |
288 # between projects when cloning. | 288 # between projects when cloning. |
289 print('') | 289 print('') |
290 return | 290 return |
291 | 291 |
292 if not managed: | 292 if not managed: |
| 293 self._UpdateBranchHeads(options, fetch=False) |
293 self.UpdateSubmoduleConfig() | 294 self.UpdateSubmoduleConfig() |
294 print ('________ unmanaged solution; skipping %s' % self.relpath) | 295 print ('________ unmanaged solution; skipping %s' % self.relpath) |
295 return | 296 return |
296 | 297 |
297 if not os.path.exists(os.path.join(self.checkout_path, '.git')): | 298 if not os.path.exists(os.path.join(self.checkout_path, '.git')): |
298 raise gclient_utils.Error('\n____ %s%s\n' | 299 raise gclient_utils.Error('\n____ %s%s\n' |
299 '\tPath is not a git repo. No .git dir.\n' | 300 '\tPath is not a git repo. No .git dir.\n' |
300 '\tTo resolve:\n' | 301 '\tTo resolve:\n' |
301 '\t\trm -rf %s\n' | 302 '\t\trm -rf %s\n' |
302 '\tAnd run gclient sync again\n' | 303 '\tAnd run gclient sync again\n' |
(...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1257 new_command.append('--force') | 1258 new_command.append('--force') |
1258 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1259 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1259 new_command.extend(('--accept', 'theirs-conflict')) | 1260 new_command.extend(('--accept', 'theirs-conflict')) |
1260 elif options.manually_grab_svn_rev: | 1261 elif options.manually_grab_svn_rev: |
1261 new_command.append('--force') | 1262 new_command.append('--force') |
1262 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1263 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1263 new_command.extend(('--accept', 'postpone')) | 1264 new_command.extend(('--accept', 'postpone')) |
1264 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1265 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1265 new_command.extend(('--accept', 'postpone')) | 1266 new_command.extend(('--accept', 'postpone')) |
1266 return new_command | 1267 return new_command |
OLD | NEW |