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 """SCM-specific utility classes.""" | 5 """SCM-specific utility classes.""" |
6 | 6 |
7 import cStringIO | 7 import cStringIO |
8 import glob | 8 import glob |
9 import logging | 9 import logging |
10 import os | 10 import os |
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
978 gclient_utils.RemoveDirectory(file_path) | 978 gclient_utils.RemoveDirectory(file_path) |
979 else: | 979 else: |
980 logging.critical( | 980 logging.critical( |
981 ('No idea what is %s.\nYou just found a bug in gclient' | 981 ('No idea what is %s.\nYou just found a bug in gclient' |
982 ', please ping maruel@chromium.org ASAP!') % file_path) | 982 ', please ping maruel@chromium.org ASAP!') % file_path) |
983 | 983 |
984 if (file_status[0][0] in ('D', 'A', '!') or | 984 if (file_status[0][0] in ('D', 'A', '!') or |
985 not file_status[0][1:].isspace()): | 985 not file_status[0][1:].isspace()): |
986 # Added, deleted file requires manual intervention and require calling | 986 # Added, deleted file requires manual intervention and require calling |
987 # revert, like for properties. | 987 # revert, like for properties. |
| 988 if not os.path.isdir(repo_root): |
| 989 # '.' was deleted. It's not worth continuing. |
| 990 return |
988 try: | 991 try: |
989 SVN.Capture(['revert', file_status[1]], cwd=repo_root) | 992 SVN.Capture(['revert', file_status[1]], cwd=repo_root) |
990 except subprocess2.CalledProcessError: | 993 except subprocess2.CalledProcessError: |
991 if not os.path.exists(file_path): | 994 if not os.path.exists(file_path): |
992 continue | 995 continue |
993 raise | 996 raise |
OLD | NEW |