| 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 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1045 self.config_content = None | 1045 self.config_content = None |
| 1046 | 1046 |
| 1047 def _CheckConfig(self): | 1047 def _CheckConfig(self): |
| 1048 """Verify that the config matches the state of the existing checked-out | 1048 """Verify that the config matches the state of the existing checked-out |
| 1049 solutions.""" | 1049 solutions.""" |
| 1050 for dep in self.dependencies: | 1050 for dep in self.dependencies: |
| 1051 if dep.managed and dep.url: | 1051 if dep.managed and dep.url: |
| 1052 scm = gclient_scm.CreateSCM(dep.url, self.root_dir, dep.name) | 1052 scm = gclient_scm.CreateSCM(dep.url, self.root_dir, dep.name) |
| 1053 actual_url = scm.GetActualRemoteURL() | 1053 actual_url = scm.GetActualRemoteURL() |
| 1054 if actual_url and not scm.DoesRemoteURLMatch(): | 1054 if actual_url and not scm.DoesRemoteURLMatch(): |
| 1055 print >> sys.stderr, (''' | 1055 gclient_utils.AddWarning(''' |
| 1056 ################################################################################ | 1056 ################################################################################ |
| 1057 ################################### WARNING! ################################### | 1057 ################################### WARNING! ################################### |
| 1058 ################################################################################ | 1058 ################################################################################ |
| 1059 | 1059 |
| 1060 Your .gclient file seems to be broken. The requested URL is different from what | 1060 Your .gclient file seems to be broken. The requested URL is different from what |
| 1061 is actually checked out in %(checkout_path)s. In the future this will be an | 1061 is actually checked out in %(checkout_path)s. In the future this will be an |
| 1062 error. | 1062 error. |
| 1063 | 1063 |
| 1064 Expected: %(expected_url)s (%(expected_scm)s) | 1064 Expected: %(expected_url)s (%(expected_scm)s) |
| 1065 Actual: %(actual_url)s (%(actual_scm)s) | 1065 Actual: %(actual_url)s (%(actual_scm)s) |
| (...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1950 colorama.init() | 1950 colorama.init() |
| 1951 dispatcher = subcommand.CommandDispatcher(__name__) | 1951 dispatcher = subcommand.CommandDispatcher(__name__) |
| 1952 try: | 1952 try: |
| 1953 return dispatcher.execute(OptionParser(), argv) | 1953 return dispatcher.execute(OptionParser(), argv) |
| 1954 except KeyboardInterrupt: | 1954 except KeyboardInterrupt: |
| 1955 gclient_utils.GClientChildren.KillAllRemainingChildren() | 1955 gclient_utils.GClientChildren.KillAllRemainingChildren() |
| 1956 raise | 1956 raise |
| 1957 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 1957 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
| 1958 print >> sys.stderr, 'Error: %s' % str(e) | 1958 print >> sys.stderr, 'Error: %s' % str(e) |
| 1959 return 1 | 1959 return 1 |
| 1960 finally: |
| 1961 gclient_utils.PrintWarnings() |
| 1960 | 1962 |
| 1961 | 1963 |
| 1962 if '__main__' == __name__: | 1964 if '__main__' == __name__: |
| 1963 sys.exit(Main(sys.argv[1:])) | 1965 sys.exit(Main(sys.argv[1:])) |
| 1964 | 1966 |
| 1965 # vim: ts=2:sw=2:tw=80:et: | 1967 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |