OLD | NEW |
1 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2010 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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
833 """ | 833 """ |
834 if not os.path.isdir(self.checkout_path): | 834 if not os.path.isdir(self.checkout_path): |
835 # svn revert won't work if the directory doesn't exist. It needs to | 835 # svn revert won't work if the directory doesn't exist. It needs to |
836 # checkout instead. | 836 # checkout instead. |
837 print('\n_____ %s is missing, synching instead' % self.relpath) | 837 print('\n_____ %s is missing, synching instead' % self.relpath) |
838 # Don't reuse the args. | 838 # Don't reuse the args. |
839 return self.update(options, [], file_list) | 839 return self.update(options, [], file_list) |
840 | 840 |
841 for file_status in scm.SVN.CaptureStatus(self.checkout_path): | 841 for file_status in scm.SVN.CaptureStatus(self.checkout_path): |
842 file_path = os.path.join(self.checkout_path, file_status[1]) | 842 file_path = os.path.join(self.checkout_path, file_status[1]) |
843 if file_status[0][0] == 'X': | 843 # Temporarily forcibly delete externals to make sure chromium can build |
844 # Ignore externals. | 844 # without svn:external's. |
845 logging.info('Ignoring external %s' % file_path) | 845 #if file_status[0][0] == 'X': |
846 continue | 846 # # Ignore externals. |
| 847 # logging.info('Ignoring external %s' % file_path) |
| 848 # continue |
847 | 849 |
848 if logging.getLogger().isEnabledFor(logging.INFO): | 850 if logging.getLogger().isEnabledFor(logging.INFO): |
849 logging.info('%s%s' % (file[0], file[1])) | 851 logging.info('%s%s' % (file[0], file[1])) |
850 else: | 852 else: |
851 print(file_path) | 853 print(file_path) |
852 | 854 |
853 if file_status[0].isspace(): | 855 if file_status[0].isspace(): |
854 logging.error('No idea what is the status of %s.\n' | 856 logging.error('No idea what is the status of %s.\n' |
855 'You just found a bug in gclient, please ping ' | 857 'You just found a bug in gclient, please ping ' |
856 'maruel@chromium.org ASAP!' % file_path) | 858 'maruel@chromium.org ASAP!' % file_path) |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 | 911 |
910 def _Run(self, args, options, **kwargs): | 912 def _Run(self, args, options, **kwargs): |
911 """Runs a commands that goes to stdout.""" | 913 """Runs a commands that goes to stdout.""" |
912 kwargs.setdefault('cwd', self.checkout_path) | 914 kwargs.setdefault('cwd', self.checkout_path) |
913 gclient_utils.CheckCallAndFilterAndHeader(['svn'] + args, | 915 gclient_utils.CheckCallAndFilterAndHeader(['svn'] + args, |
914 always=options.verbose, **kwargs) | 916 always=options.verbose, **kwargs) |
915 | 917 |
916 def _RunAndGetFileList(self, args, options, file_list, cwd=None): | 918 def _RunAndGetFileList(self, args, options, file_list, cwd=None): |
917 """Runs a commands that goes to stdout and grabs the file listed.""" | 919 """Runs a commands that goes to stdout and grabs the file listed.""" |
918 cwd = cwd or self.checkout_path | 920 cwd = cwd or self.checkout_path |
919 scm.SVN.RunAndGetFileList(options.verbose, args, cwd=cwd, | 921 scm.SVN.RunAndGetFileList( |
| 922 options.verbose, |
| 923 args + ['--ignore-externals'], |
| 924 cwd=cwd, |
920 file_list=file_list) | 925 file_list=file_list) |
921 | 926 |
922 @staticmethod | 927 @staticmethod |
923 def _AddAdditionalUpdateFlags(command, options, revision): | 928 def _AddAdditionalUpdateFlags(command, options, revision): |
924 """Add additional flags to command depending on what options are set. | 929 """Add additional flags to command depending on what options are set. |
925 command should be a list of strings that represents an svn command. | 930 command should be a list of strings that represents an svn command. |
926 | 931 |
927 This method returns a new list to be used as a command.""" | 932 This method returns a new list to be used as a command.""" |
928 new_command = command[:] | 933 new_command = command[:] |
929 if revision: | 934 if revision: |
930 new_command.extend(['--revision', str(revision).strip()]) | 935 new_command.extend(['--revision', str(revision).strip()]) |
931 # --force was added to 'svn update' in svn 1.5. | 936 # --force was added to 'svn update' in svn 1.5. |
932 if ((options.force or options.manually_grab_svn_rev) and | 937 if ((options.force or options.manually_grab_svn_rev) and |
933 scm.SVN.AssertVersion("1.5")[0]): | 938 scm.SVN.AssertVersion("1.5")[0]): |
934 new_command.append('--force') | 939 new_command.append('--force') |
935 return new_command | 940 return new_command |
OLD | NEW |