Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: scm.py

Issue 8431021: Handle cases where '.' show up in svn status and is deleted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Add another test Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gclient_scm.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « gclient_scm.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698