Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: gclient_scm.py

Issue 1296933004: Really update config whenever --with_branch_heads is given. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 else: 508 else:
509 raise gclient_utils.Error('Invalid Upstream: %s' % upstream_branch) 509 raise gclient_utils.Error('Invalid Upstream: %s' % upstream_branch)
510 510
511 if not scm.GIT.IsValidRevision(self.checkout_path, revision, sha_only=True): 511 if not scm.GIT.IsValidRevision(self.checkout_path, revision, sha_only=True):
512 # Update the remotes first so we have all the refs. 512 # Update the remotes first so we have all the refs.
513 remote_output = scm.GIT.Capture(['remote'] + verbose + ['update'], 513 remote_output = scm.GIT.Capture(['remote'] + verbose + ['update'],
514 cwd=self.checkout_path) 514 cwd=self.checkout_path)
515 if verbose: 515 if verbose:
516 self.Print(remote_output) 516 self.Print(remote_output)
517 517
518 self._UpdateBranchHeads(options, fetch=True) 518 self._UpdateBranchHeads(options, fetch=True)
519 519
520 # This is a big hammer, debatable if it should even be here... 520 # This is a big hammer, debatable if it should even be here...
521 if options.force or options.reset: 521 if options.force or options.reset:
522 target = 'HEAD' 522 target = 'HEAD'
523 if options.upstream and upstream_branch: 523 if options.upstream and upstream_branch:
524 target = upstream_branch 524 target = upstream_branch
525 self._Run(['reset', '--hard', target], options) 525 self._Run(['reset', '--hard', target], options)
526 526
527 if current_type == 'detached': 527 if current_type == 'detached':
528 # case 0 528 # case 0
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1654 new_command.append('--force') 1654 new_command.append('--force')
1655 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1655 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1656 new_command.extend(('--accept', 'theirs-conflict')) 1656 new_command.extend(('--accept', 'theirs-conflict'))
1657 elif options.manually_grab_svn_rev: 1657 elif options.manually_grab_svn_rev:
1658 new_command.append('--force') 1658 new_command.append('--force')
1659 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1659 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1660 new_command.extend(('--accept', 'postpone')) 1660 new_command.extend(('--accept', 'postpone'))
1661 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: 1661 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]:
1662 new_command.extend(('--accept', 'postpone')) 1662 new_command.extend(('--accept', 'postpone'))
1663 return new_command 1663 return new_command
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698