| 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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 command = ['export', '--force', '.'] | 695 command = ['export', '--force', '.'] |
| 696 command.append(export_path) | 696 command.append(export_path) |
| 697 scm.SVN.Run(command, os.path.join(self._root_dir, self.relpath)) | 697 scm.SVN.Run(command, os.path.join(self._root_dir, self.relpath)) |
| 698 | 698 |
| 699 def pack(self, options, args, file_list): | 699 def pack(self, options, args, file_list): |
| 700 """Generates a patch file which can be applied to the root of the | 700 """Generates a patch file which can be applied to the root of the |
| 701 repository.""" | 701 repository.""" |
| 702 path = os.path.join(self._root_dir, self.relpath) | 702 path = os.path.join(self._root_dir, self.relpath) |
| 703 if not os.path.isdir(path): | 703 if not os.path.isdir(path): |
| 704 raise gclient_utils.Error('Directory %s is not present.' % path) | 704 raise gclient_utils.Error('Directory %s is not present.' % path) |
| 705 command = ['diff'] | 705 command = ['diff', '-x', '--ignore-eol-style'] |
| 706 command.extend(args) | 706 command.extend(args) |
| 707 | 707 |
| 708 filterer = DiffFilterer(self.relpath) | 708 filterer = DiffFilterer(self.relpath) |
| 709 scm.SVN.RunAndFilterOutput(command, path, False, False, filterer.Filter) | 709 scm.SVN.RunAndFilterOutput(command, path, False, False, filterer.Filter) |
| 710 | 710 |
| 711 def update(self, options, args, file_list): | 711 def update(self, options, args, file_list): |
| 712 """Runs svn to update or transparently checkout the working copy. | 712 """Runs svn to update or transparently checkout the working copy. |
| 713 | 713 |
| 714 All updated files will be appended to file_list. | 714 All updated files will be appended to file_list. |
| 715 | 715 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 | 961 |
| 962 This method returns a new list to be used as a command.""" | 962 This method returns a new list to be used as a command.""" |
| 963 new_command = command[:] | 963 new_command = command[:] |
| 964 if revision: | 964 if revision: |
| 965 new_command.extend(['--revision', str(revision).strip()]) | 965 new_command.extend(['--revision', str(revision).strip()]) |
| 966 # --force was added to 'svn update' in svn 1.5. | 966 # --force was added to 'svn update' in svn 1.5. |
| 967 if ((options.force or options.manually_grab_svn_rev) and | 967 if ((options.force or options.manually_grab_svn_rev) and |
| 968 scm.SVN.AssertVersion("1.5")[0]): | 968 scm.SVN.AssertVersion("1.5")[0]): |
| 969 new_command.append('--force') | 969 new_command.append('--force') |
| 970 return new_command | 970 return new_command |
| OLD | NEW |