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 errno | 9 import errno |
10 import logging | 10 import logging |
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1640 # Don't reuse the args. | 1640 # Don't reuse the args. |
1641 return self.update(options, [], file_list) | 1641 return self.update(options, [], file_list) |
1642 | 1642 |
1643 try: | 1643 try: |
1644 # svn revert is so broken we don't even use it. Using | 1644 # svn revert is so broken we don't even use it. Using |
1645 # "svn up --revision BASE" achieve the same effect. | 1645 # "svn up --revision BASE" achieve the same effect. |
1646 # file_list will contain duplicates. | 1646 # file_list will contain duplicates. |
1647 self._RunAndGetFileList(['update', '--revision', 'BASE'], options, | 1647 self._RunAndGetFileList(['update', '--revision', 'BASE'], options, |
1648 file_list) | 1648 file_list) |
1649 except OSError, e: | 1649 except OSError, e: |
1650 # Maybe the directory disapeared meanwhile. Do not throw an exception. | 1650 # Maybe the directory disappeared meanwhile. Do not throw an exception. |
1651 logging.error('Failed to update:\n%s' % str(e)) | 1651 logging.error('Failed to update:\n%s' % str(e)) |
1652 | 1652 |
1653 def revinfo(self, _options, _args, _file_list): | 1653 def revinfo(self, _options, _args, _file_list): |
1654 """Display revision""" | 1654 """Display revision""" |
1655 try: | 1655 try: |
1656 return scm.SVN.CaptureRevision(self.checkout_path) | 1656 return scm.SVN.CaptureRevision(self.checkout_path) |
1657 except (gclient_utils.Error, subprocess2.CalledProcessError): | 1657 except (gclient_utils.Error, subprocess2.CalledProcessError): |
1658 return None | 1658 return None |
1659 | 1659 |
1660 def runhooks(self, options, args, file_list): | 1660 def runhooks(self, options, args, file_list): |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 new_command.append('--force') | 1727 new_command.append('--force') |
1728 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1728 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1729 new_command.extend(('--accept', 'theirs-conflict')) | 1729 new_command.extend(('--accept', 'theirs-conflict')) |
1730 elif options.manually_grab_svn_rev: | 1730 elif options.manually_grab_svn_rev: |
1731 new_command.append('--force') | 1731 new_command.append('--force') |
1732 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1732 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1733 new_command.extend(('--accept', 'postpone')) | 1733 new_command.extend(('--accept', 'postpone')) |
1734 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: | 1734 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
1735 new_command.extend(('--accept', 'postpone')) | 1735 new_command.extend(('--accept', 'postpone')) |
1736 return new_command | 1736 return new_command |
OLD | NEW |