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

Side by Side Diff: gclient.py

Issue 228793002: gclient: Fix cache_dir functionality (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Replace path separator for Windows case Created 6 years, 8 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 | gclient_scm.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Meta checkout manager supporting both Subversion and GIT.""" 6 """Meta checkout manager supporting both Subversion and GIT."""
7 # Files 7 # Files
8 # .gclient : Current client configuration, written by 'config' command. 8 # .gclient : Current client configuration, written by 'config' command.
9 # Format is a Python script defining 'solutions', a list whose 9 # Format is a Python script defining 'solutions', a list whose
10 # entries each are maps binding the strings "name" and "url" 10 # entries each are maps binding the strings "name" and "url"
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 self._enforced_os = tuple(set(enforced_os)) 1044 self._enforced_os = tuple(set(enforced_os))
1045 self._root_dir = root_dir 1045 self._root_dir = root_dir
1046 self.config_content = None 1046 self.config_content = None
1047 1047
1048 def _CheckConfig(self): 1048 def _CheckConfig(self):
1049 """Verify that the config matches the state of the existing checked-out 1049 """Verify that the config matches the state of the existing checked-out
1050 solutions.""" 1050 solutions."""
1051 for dep in self.dependencies: 1051 for dep in self.dependencies:
1052 if dep.managed and dep.url: 1052 if dep.managed and dep.url:
1053 scm = gclient_scm.CreateSCM(dep.url, self.root_dir, dep.name) 1053 scm = gclient_scm.CreateSCM(dep.url, self.root_dir, dep.name)
1054 actual_url = scm.GetActualRemoteURL() 1054 actual_url = scm.GetActualRemoteURL(self._options)
1055 if actual_url and not scm.DoesRemoteURLMatch(): 1055 if actual_url and not scm.DoesRemoteURLMatch(self._options):
1056 raise gclient_utils.Error(''' 1056 raise gclient_utils.Error('''
1057 Your .gclient file seems to be broken. The requested URL is different from what 1057 Your .gclient file seems to be broken. The requested URL is different from what
1058 is actually checked out in %(checkout_path)s. 1058 is actually checked out in %(checkout_path)s.
1059 1059
1060 The .gclient file contains: 1060 The .gclient file contains:
1061 %(expected_url)s (%(expected_scm)s) 1061 %(expected_url)s (%(expected_scm)s)
1062 1062
1063 The local checkout in %(checkout_path)s reports: 1063 The local checkout in %(checkout_path)s reports:
1064 %(actual_url)s (%(actual_scm)s) 1064 %(actual_url)s (%(actual_scm)s)
1065 1065
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after
1955 print >> sys.stderr, 'Error: %s' % str(e) 1955 print >> sys.stderr, 'Error: %s' % str(e)
1956 return 1 1956 return 1
1957 finally: 1957 finally:
1958 gclient_utils.PrintWarnings() 1958 gclient_utils.PrintWarnings()
1959 1959
1960 1960
1961 if '__main__' == __name__: 1961 if '__main__' == __name__:
1962 sys.exit(Main(sys.argv[1:])) 1962 sys.exit(Main(sys.argv[1:]))
1963 1963
1964 # vim: ts=2:sw=2:tw=80:et: 1964 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | gclient_scm.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698