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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 self._allowed_hosts) | 702 self._allowed_hosts) |
703 raise gclient_utils.Error( | 703 raise gclient_utils.Error( |
704 'ParseDepsFile(%s): allowed_hosts must be absent ' | 704 'ParseDepsFile(%s): allowed_hosts must be absent ' |
705 'or a non-empty iterable' % self.name) | 705 'or a non-empty iterable' % self.name) |
706 | 706 |
707 # Convert the deps into real Dependency. | 707 # Convert the deps into real Dependency. |
708 deps_to_add = [] | 708 deps_to_add = [] |
709 for name, url in deps.iteritems(): | 709 for name, url in deps.iteritems(): |
710 should_process = self.recursion_limit and self.should_process | 710 should_process = self.recursion_limit and self.should_process |
711 deps_to_add.append(Dependency( | 711 deps_to_add.append(Dependency( |
712 self, name, url, None, None, None, None, None, | 712 self, name, url, None, None, None, self.custom_vars, None, |
713 self.deps_file, should_process)) | 713 self.deps_file, should_process)) |
714 deps_to_add.sort(key=lambda x: x.name) | 714 deps_to_add.sort(key=lambda x: x.name) |
715 | 715 |
716 # override named sets of hooks by the custom hooks | 716 # override named sets of hooks by the custom hooks |
717 hooks_to_run = [] | 717 hooks_to_run = [] |
718 hook_names_to_suppress = [c.get('name', '') for c in self.custom_hooks] | 718 hook_names_to_suppress = [c.get('name', '') for c in self.custom_hooks] |
719 for hook in local_scope.get('hooks', []): | 719 for hook in local_scope.get('hooks', []): |
720 if hook.get('name', '') not in hook_names_to_suppress: | 720 if hook.get('name', '') not in hook_names_to_suppress: |
721 hooks_to_run.append(hook) | 721 hooks_to_run.append(hook) |
722 | 722 |
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2319 | 2319 |
2320 | 2320 |
2321 if '__main__' == __name__: | 2321 if '__main__' == __name__: |
2322 try: | 2322 try: |
2323 sys.exit(main(sys.argv[1:])) | 2323 sys.exit(main(sys.argv[1:])) |
2324 except KeyboardInterrupt: | 2324 except KeyboardInterrupt: |
2325 sys.stderr.write('interrupted\n') | 2325 sys.stderr.write('interrupted\n') |
2326 sys.exit(1) | 2326 sys.exit(1) |
2327 | 2327 |
2328 # vim: ts=2:sw=2:tw=80:et: | 2328 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |