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

Side by Side Diff: gclient_scm.py

Issue 8020004: Print debugging information when svn info didn't return the URL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 3 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 """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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 return 772 return
773 773
774 # Get the existing scm url and the revision number of the current checkout. 774 # Get the existing scm url and the revision number of the current checkout.
775 try: 775 try:
776 from_info = scm.SVN.CaptureInfo(os.path.join(self.checkout_path, '.')) 776 from_info = scm.SVN.CaptureInfo(os.path.join(self.checkout_path, '.'))
777 except (gclient_utils.Error, subprocess2.CalledProcessError): 777 except (gclient_utils.Error, subprocess2.CalledProcessError):
778 raise gclient_utils.Error( 778 raise gclient_utils.Error(
779 ('Can\'t update/checkout %s if an unversioned directory is present. ' 779 ('Can\'t update/checkout %s if an unversioned directory is present. '
780 'Delete the directory and try again.') % self.checkout_path) 780 'Delete the directory and try again.') % self.checkout_path)
781 781
782 if 'URL' not in from_info:
783 raise gclient_utils.Error(
784 ('gclient is confused. Couldn\'t get the url for %s.\n'
785 'Try using @unmanaged.\n%s') % (
786 self.checkout_path, from_info))
787
782 # Look for locked directories. 788 # Look for locked directories.
783 dir_info = scm.SVN.CaptureStatus(os.path.join(self.checkout_path, '.')) 789 dir_info = scm.SVN.CaptureStatus(os.path.join(self.checkout_path, '.'))
784 if any(d[0][2] == 'L' for d in dir_info): 790 if any(d[0][2] == 'L' for d in dir_info):
785 try: 791 try:
786 self._Run(['cleanup', self.checkout_path], options) 792 self._Run(['cleanup', self.checkout_path], options)
787 except subprocess2.CalledProcessError, e: 793 except subprocess2.CalledProcessError, e:
788 # Get the status again, svn cleanup may have cleaned up at least 794 # Get the status again, svn cleanup may have cleaned up at least
789 # something. 795 # something.
790 dir_info = scm.SVN.CaptureStatus(os.path.join(self.checkout_path, '.')) 796 dir_info = scm.SVN.CaptureStatus(os.path.join(self.checkout_path, '.'))
791 797
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 978
973 This method returns a new list to be used as a command.""" 979 This method returns a new list to be used as a command."""
974 new_command = command[:] 980 new_command = command[:]
975 if revision: 981 if revision:
976 new_command.extend(['--revision', str(revision).strip()]) 982 new_command.extend(['--revision', str(revision).strip()])
977 # --force was added to 'svn update' in svn 1.5. 983 # --force was added to 'svn update' in svn 1.5.
978 if ((options.force or options.manually_grab_svn_rev) and 984 if ((options.force or options.manually_grab_svn_rev) and
979 scm.SVN.AssertVersion("1.5")[0]): 985 scm.SVN.AssertVersion("1.5")[0]):
980 new_command.append('--force') 986 new_command.append('--force')
981 return new_command 987 return new_command
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