| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # | 2 # |
| 3 # Copyright 2008 Google Inc. All Rights Reserved. | 3 # Copyright 2008 Google Inc. All Rights Reserved. |
| 4 # | 4 # |
| 5 # Licensed under the Apache License, Version 2.0 (the "License"); | 5 # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 # you may not use this file except in compliance with the License. | 6 # you may not use this file except in compliance with the License. |
| 7 # You may obtain a copy of the License at | 7 # You may obtain a copy of the License at |
| 8 # | 8 # |
| 9 # http://www.apache.org/licenses/LICENSE-2.0 | 9 # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 # | 10 # |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 # Run on the base solutions first. | 663 # Run on the base solutions first. |
| 664 for solution in solutions: | 664 for solution in solutions: |
| 665 name = solution["name"] | 665 name = solution["name"] |
| 666 deps_file = solution.get("deps_file", self._options.deps_file) | 666 deps_file = solution.get("deps_file", self._options.deps_file) |
| 667 if '/' in deps_file or '\\' in deps_file: | 667 if '/' in deps_file or '\\' in deps_file: |
| 668 raise Error("deps_file name must not be a path, just a filename.") | 668 raise Error("deps_file name must not be a path, just a filename.") |
| 669 if name in entries: | 669 if name in entries: |
| 670 raise Error("solution %s specified more than once" % name) | 670 raise Error("solution %s specified more than once" % name) |
| 671 url = solution["url"] | 671 url = solution["url"] |
| 672 entries[name] = url | 672 entries[name] = url |
| 673 if run_scm: | 673 if run_scm and url: |
| 674 self._options.revision = revision_overrides.get(name) | 674 self._options.revision = revision_overrides.get(name) |
| 675 scm = gclient_scm.CreateSCM(url, self._root_dir, name) | 675 scm = gclient_scm.CreateSCM(url, self._root_dir, name) |
| 676 scm.RunCommand(command, self._options, args, file_list) | 676 scm.RunCommand(command, self._options, args, file_list) |
| 677 file_list = [os.path.join(name, file.strip()) for file in file_list] | 677 file_list = [os.path.join(name, file.strip()) for file in file_list] |
| 678 self._options.revision = None | 678 self._options.revision = None |
| 679 try: | 679 try: |
| 680 deps_content = FileRead(os.path.join(self._root_dir, name, | 680 deps_content = FileRead(os.path.join(self._root_dir, name, |
| 681 deps_file)) | 681 deps_file)) |
| 682 except IOError, e: | 682 except IOError, e: |
| 683 if e.errno != errno.ENOENT: | 683 if e.errno != errno.ENOENT: |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1183 | 1183 |
| 1184 if "__main__" == __name__: | 1184 if "__main__" == __name__: |
| 1185 try: | 1185 try: |
| 1186 result = Main(sys.argv) | 1186 result = Main(sys.argv) |
| 1187 except Error, e: | 1187 except Error, e: |
| 1188 print >> sys.stderr, "Error: %s" % str(e) | 1188 print >> sys.stderr, "Error: %s" % str(e) |
| 1189 result = 1 | 1189 result = 1 |
| 1190 sys.exit(result) | 1190 sys.exit(result) |
| 1191 | 1191 |
| 1192 # vim: ts=2:sw=2:tw=80:et: | 1192 # vim: ts=2:sw=2:tw=80:et: |
| OLD | NEW |