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

Side by Side Diff: scm.py

Issue 8233033: Add another error code where gclient sync should retry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 2 months 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 | « no previous file | no next file » | 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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 always=verbose, 464 always=verbose,
465 filter_fn=CaptureMatchingLines, 465 filter_fn=CaptureMatchingLines,
466 stdout=stdout) 466 stdout=stdout)
467 except subprocess2.CalledProcessError: 467 except subprocess2.CalledProcessError:
468 def IsKnownFailure(): 468 def IsKnownFailure():
469 for x in failure: 469 for x in failure:
470 if (x.startswith('svn: OPTIONS of') or 470 if (x.startswith('svn: OPTIONS of') or
471 x.startswith('svn: PROPFIND of') or 471 x.startswith('svn: PROPFIND of') or
472 x.startswith('svn: REPORT of') or 472 x.startswith('svn: REPORT of') or
473 x.startswith('svn: Unknown hostname') or 473 x.startswith('svn: Unknown hostname') or
474 x.startswith('svn: Server sent unexpected return value')): 474 x.startswith('svn: Server sent unexpected return value') or
475 x.startswith('svn: Can\'t connect to host')):
475 return True 476 return True
476 return False 477 return False
477 478
478 # Subversion client is really misbehaving with Google Code. 479 # Subversion client is really misbehaving with Google Code.
479 if args[0] == 'checkout': 480 if args[0] == 'checkout':
480 # Ensure at least one file was checked out, otherwise *delete* the 481 # Ensure at least one file was checked out, otherwise *delete* the
481 # directory. 482 # directory.
482 if len(file_list) == previous_list_len: 483 if len(file_list) == previous_list_len:
483 if not IsKnownFailure(): 484 if not IsKnownFailure():
484 # No known svn error was found, bail out. 485 # No known svn error was found, bail out.
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 if (file_status[0][0] in ('D', 'A', '!') or 984 if (file_status[0][0] in ('D', 'A', '!') or
984 not file_status[0][1:].isspace()): 985 not file_status[0][1:].isspace()):
985 # Added, deleted file requires manual intervention and require calling 986 # Added, deleted file requires manual intervention and require calling
986 # revert, like for properties. 987 # revert, like for properties.
987 try: 988 try:
988 SVN.Capture(['revert', file_status[1]], cwd=repo_root) 989 SVN.Capture(['revert', file_status[1]], cwd=repo_root)
989 except subprocess2.CalledProcessError: 990 except subprocess2.CalledProcessError:
990 if not os.path.exists(file_path): 991 if not os.path.exists(file_path):
991 continue 992 continue
992 raise 993 raise
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698