| OLD | NEW |
| 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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1072 self._root_dir = root_dir | 1072 self._root_dir = root_dir |
| 1073 self.config_content = None | 1073 self.config_content = None |
| 1074 | 1074 |
| 1075 def _CheckConfig(self): | 1075 def _CheckConfig(self): |
| 1076 """Verify that the config matches the state of the existing checked-out | 1076 """Verify that the config matches the state of the existing checked-out |
| 1077 solutions.""" | 1077 solutions.""" |
| 1078 for dep in self.dependencies: | 1078 for dep in self.dependencies: |
| 1079 if dep.managed and dep.url: | 1079 if dep.managed and dep.url: |
| 1080 scm = gclient_scm.CreateSCM( | 1080 scm = gclient_scm.CreateSCM( |
| 1081 dep.url, self.root_dir, dep.name, self.outbuf) | 1081 dep.url, self.root_dir, dep.name, self.outbuf) |
| 1082 actual_url = scm.GetActualRemoteURL(self._options) | 1082 actual_url = scm.GetActualRemoteURL() |
| 1083 if actual_url and not scm.DoesRemoteURLMatch(self._options): | 1083 if actual_url and not scm.DoesRemoteURLMatch(self._options): |
| 1084 raise gclient_utils.Error(''' | 1084 raise gclient_utils.Error(''' |
| 1085 Your .gclient file seems to be broken. The requested URL is different from what | 1085 Your .gclient file seems to be broken. The requested URL is different from what |
| 1086 is actually checked out in %(checkout_path)s. | 1086 is actually checked out in %(checkout_path)s. |
| 1087 | 1087 |
| 1088 The .gclient file contains: | 1088 The .gclient file contains: |
| 1089 %(expected_url)s (%(expected_scm)s) | 1089 %(expected_url)s (%(expected_scm)s) |
| 1090 | 1090 |
| 1091 The local checkout in %(checkout_path)s reports: | 1091 The local checkout in %(checkout_path)s reports: |
| 1092 %(actual_url)s (%(actual_scm)s) | 1092 %(actual_url)s (%(actual_scm)s) |
| (...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2007 print >> sys.stderr, 'Error: %s' % str(e) | 2007 print >> sys.stderr, 'Error: %s' % str(e) |
| 2008 return 1 | 2008 return 1 |
| 2009 finally: | 2009 finally: |
| 2010 gclient_utils.PrintWarnings() | 2010 gclient_utils.PrintWarnings() |
| 2011 | 2011 |
| 2012 | 2012 |
| 2013 if '__main__' == __name__: | 2013 if '__main__' == __name__: |
| 2014 sys.exit(Main(sys.argv[1:])) | 2014 sys.exit(Main(sys.argv[1:])) |
| 2015 | 2015 |
| 2016 # vim: ts=2:sw=2:tw=80:et: | 2016 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |