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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 ['checkout', '--quiet', revision.replace('refs/heads/', '')], options) | 792 ['checkout', '--quiet', revision.replace('refs/heads/', '')], options) |
793 else: | 793 else: |
794 # Squelch git's very verbose detached HEAD warning and use our own | 794 # Squelch git's very verbose detached HEAD warning and use our own |
795 self._Run(['checkout', '--quiet', revision], options) | 795 self._Run(['checkout', '--quiet', revision], options) |
796 self.Print( | 796 self.Print( |
797 ('Checked out %s to a detached HEAD. Before making any commits\n' | 797 ('Checked out %s to a detached HEAD. Before making any commits\n' |
798 'in this repo, you should use \'git checkout <branch>\' to switch to\n' | 798 'in this repo, you should use \'git checkout <branch>\' to switch to\n' |
799 'an existing branch or use \'git checkout %s -b <branch>\' to\n' | 799 'an existing branch or use \'git checkout %s -b <branch>\' to\n' |
800 'create a new branch for your work.') % (revision, self.remote)) | 800 'create a new branch for your work.') % (revision, self.remote)) |
801 | 801 |
802 @staticmethod | 802 def _AskForData(self, prompt, options): |
803 def _AskForData(prompt, options): | |
804 if options.jobs > 1: | 803 if options.jobs > 1: |
| 804 self.Print(prompt) |
805 raise gclient_utils.Error("Background task requires input. Rerun " | 805 raise gclient_utils.Error("Background task requires input. Rerun " |
806 "gclient with --jobs=1 so that\n" | 806 "gclient with --jobs=1 so that\n" |
807 "interaction is possible.") | 807 "interaction is possible.") |
808 try: | 808 try: |
809 return raw_input(prompt) | 809 return raw_input(prompt) |
810 except KeyboardInterrupt: | 810 except KeyboardInterrupt: |
811 # Hide the exception. | 811 # Hide the exception. |
812 sys.exit(1) | 812 sys.exit(1) |
813 | 813 |
814 | 814 |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1461 new_command.append('--force') | 1461 new_command.append('--force') |
1462 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1462 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1463 new_command.extend(('--accept', 'theirs-conflict')) | 1463 new_command.extend(('--accept', 'theirs-conflict')) |
1464 elif options.manually_grab_svn_rev: | 1464 elif options.manually_grab_svn_rev: |
1465 new_command.append('--force') | 1465 new_command.append('--force') |
1466 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1466 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1467 new_command.extend(('--accept', 'postpone')) | 1467 new_command.extend(('--accept', 'postpone')) |
1468 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1468 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1469 new_command.extend(('--accept', 'postpone')) | 1469 new_command.extend(('--accept', 'postpone')) |
1470 return new_command | 1470 return new_command |
OLD | NEW |