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

Side by Side Diff: gclient.py

Issue 370393002: Revert of Consolidated 'git' refish parsing into a class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 5 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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 self._root_dir = root_dir 1105 self._root_dir = root_dir
1106 self.config_content = None 1106 self.config_content = None
1107 1107
1108 def _CheckConfig(self): 1108 def _CheckConfig(self):
1109 """Verify that the config matches the state of the existing checked-out 1109 """Verify that the config matches the state of the existing checked-out
1110 solutions.""" 1110 solutions."""
1111 for dep in self.dependencies: 1111 for dep in self.dependencies:
1112 if dep.managed and dep.url: 1112 if dep.managed and dep.url:
1113 scm = gclient_scm.CreateSCM( 1113 scm = gclient_scm.CreateSCM(
1114 dep.url, self.root_dir, dep.name, self.outbuf) 1114 dep.url, self.root_dir, dep.name, self.outbuf)
1115 actual_url = scm.GetActualRemoteURL() 1115 actual_url = scm.GetActualRemoteURL(self._options)
1116 if actual_url and not scm.DoesRemoteURLMatch(self._options): 1116 if actual_url and not scm.DoesRemoteURLMatch(self._options):
1117 raise gclient_utils.Error(''' 1117 raise gclient_utils.Error('''
1118 Your .gclient file seems to be broken. The requested URL is different from what 1118 Your .gclient file seems to be broken. The requested URL is different from what
1119 is actually checked out in %(checkout_path)s. 1119 is actually checked out in %(checkout_path)s.
1120 1120
1121 The .gclient file contains: 1121 The .gclient file contains:
1122 %(expected_url)s (%(expected_scm)s) 1122 %(expected_url)s (%(expected_scm)s)
1123 1123
1124 The local checkout in %(checkout_path)s reports: 1124 The local checkout in %(checkout_path)s reports:
1125 %(actual_url)s (%(actual_scm)s) 1125 %(actual_url)s (%(actual_scm)s)
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 print >> sys.stderr, 'Error: %s' % str(e) 2045 print >> sys.stderr, 'Error: %s' % str(e)
2046 return 1 2046 return 1
2047 finally: 2047 finally:
2048 gclient_utils.PrintWarnings() 2048 gclient_utils.PrintWarnings()
2049 2049
2050 2050
2051 if '__main__' == __name__: 2051 if '__main__' == __name__:
2052 sys.exit(Main(sys.argv[1:])) 2052 sys.exit(Main(sys.argv[1:]))
2053 2053
2054 # vim: ts=2:sw=2:tw=80:et: 2054 # 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