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 from __future__ import print_function | 7 from __future__ import print_function |
| 8 | 8 |
| 9 import logging | 9 import logging |
| 10 import os | 10 import os |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 334 if options.verbose: | 334 if options.verbose: |
| 335 self.Print('_____ %s%s' % (self.relpath, rev_str), timestamp=False) | 335 self.Print('_____ %s%s' % (self.relpath, rev_str), timestamp=False) |
| 336 verbose = ['--verbose'] | 336 verbose = ['--verbose'] |
| 337 printed_path = True | 337 printed_path = True |
| 338 | 338 |
| 339 url = self._CreateOrUpdateCache(url, options) | 339 url = self._CreateOrUpdateCache(url, options) |
| 340 | 340 |
| 341 if revision.startswith('refs/'): | 341 if revision.startswith('refs/'): |
| 342 rev_type = "branch" | 342 rev_type = "branch" |
| 343 elif revision.startswith(self.remote + '/'): | 343 elif revision.startswith(self.remote + '/'): |
| 344 # For compatibility with old naming, translate 'origin' to 'refs/heads' | 344 # For compatibility with old naming, translate 'origin' to 'refs/heads' |
|
ghost stip (do not use)
2014/04/21 21:26:57
you should change this comment to reflect the new
smut
2014/04/21 21:28:43
This comment is no longer applicable.
agable
2014/04/21 21:31:22
Done.
| |
| 345 revision = revision.replace(self.remote + '/', 'refs/heads/') | 345 revision = 'refs/remotes/' + revision |
| 346 rev_type = "branch" | 346 rev_type = "branch" |
| 347 else: | 347 else: |
| 348 # hash is also a tag, only make a distinction at checkout | 348 # hash is also a tag, only make a distinction at checkout |
| 349 rev_type = "hash" | 349 rev_type = "hash" |
| 350 | 350 |
| 351 if (not os.path.exists(self.checkout_path) or | 351 if (not os.path.exists(self.checkout_path) or |
| 352 (os.path.isdir(self.checkout_path) and | 352 (os.path.isdir(self.checkout_path) and |
| 353 not os.path.exists(os.path.join(self.checkout_path, '.git')))): | 353 not os.path.exists(os.path.join(self.checkout_path, '.git')))): |
| 354 if (os.path.isdir(self.checkout_path) and | 354 if (os.path.isdir(self.checkout_path) and |
| 355 not os.path.exists(os.path.join(self.checkout_path, '.git'))): | 355 not os.path.exists(os.path.join(self.checkout_path, '.git'))): |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1458 new_command.append('--force') | 1458 new_command.append('--force') |
| 1459 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1459 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1460 new_command.extend(('--accept', 'theirs-conflict')) | 1460 new_command.extend(('--accept', 'theirs-conflict')) |
| 1461 elif options.manually_grab_svn_rev: | 1461 elif options.manually_grab_svn_rev: |
| 1462 new_command.append('--force') | 1462 new_command.append('--force') |
| 1463 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1463 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1464 new_command.extend(('--accept', 'postpone')) | 1464 new_command.extend(('--accept', 'postpone')) |
| 1465 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1465 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1466 new_command.extend(('--accept', 'postpone')) | 1466 new_command.extend(('--accept', 'postpone')) |
| 1467 return new_command | 1467 return new_command |
| OLD | NEW |