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

Side by Side Diff: gclient.py

Issue 1849613003: add support for custom_vars in recursive dependencies (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: removed change-id from commit message Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | 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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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:
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698