OLD | NEW |
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 | 987 |
988 @staticmethod | 988 @staticmethod |
989 def _AddAdditionalUpdateFlags(command, options, revision): | 989 def _AddAdditionalUpdateFlags(command, options, revision): |
990 """Add additional flags to command depending on what options are set. | 990 """Add additional flags to command depending on what options are set. |
991 command should be a list of strings that represents an svn command. | 991 command should be a list of strings that represents an svn command. |
992 | 992 |
993 This method returns a new list to be used as a command.""" | 993 This method returns a new list to be used as a command.""" |
994 new_command = command[:] | 994 new_command = command[:] |
995 if revision: | 995 if revision: |
996 new_command.extend(['--revision', str(revision).strip()]) | 996 new_command.extend(['--revision', str(revision).strip()]) |
| 997 # We don't want interaction when jobs are used. |
| 998 if options.jobs > 1: |
| 999 new_command.append('--non-interactive') |
997 # --force was added to 'svn update' in svn 1.5. | 1000 # --force was added to 'svn update' in svn 1.5. |
998 if ((options.force or options.manually_grab_svn_rev) and | 1001 # --accept was added to 'svn update' in svn 1.6. |
999 scm.SVN.AssertVersion("1.5")[0]): | 1002 if not scm.SVN.AssertVersion('1.5')[0]: |
| 1003 return new_command |
| 1004 |
| 1005 # It's annoying to have it block in the middle of a sync, just sensible |
| 1006 # defaults. |
| 1007 if options.force: |
1000 new_command.append('--force') | 1008 new_command.append('--force') |
| 1009 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1010 new_command.extend(('--accept', 'theirs-conflict')) |
| 1011 elif options.manually_grab_svn_rev: |
| 1012 new_command.append('--force') |
| 1013 if command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1014 new_command.extend(('--accept', 'postpone')) |
| 1015 elif command[0] != 'checkout' and scm.SVN.AssertVersion('1.6')[0]: |
| 1016 new_command.extend(('--accept', 'postpone')) |
1001 return new_command | 1017 return new_command |
OLD | NEW |