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

Side by Side Diff: gclient.py

Issue 8298002: Do not sort solutions anymore, only dependencies specified in DEPS files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/gclient_test.py » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 7
8 Files 8 Files
9 .gclient : Current client configuration, written by 'config' command. 9 .gclient : Current client configuration, written by 'config' command.
10 Format is a Python script defining 'solutions', a list whose 10 Format is a Python script defining 'solutions', a list whose
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 rel_deps[os.path.normpath(os.path.join(self.name, d))] = url 458 rel_deps[os.path.normpath(os.path.join(self.name, d))] = url
459 deps = rel_deps 459 deps = rel_deps
460 460
461 # Convert the deps into real Dependency. 461 # Convert the deps into real Dependency.
462 deps_to_add = [] 462 deps_to_add = []
463 for name, url in deps.iteritems(): 463 for name, url in deps.iteritems():
464 should_process = self.recursion_limit and self.should_process 464 should_process = self.recursion_limit and self.should_process
465 deps_to_add.append(Dependency( 465 deps_to_add.append(Dependency(
466 self, name, url, None, None, None, None, 466 self, name, url, None, None, None, None,
467 self.deps_file, should_process)) 467 self.deps_file, should_process))
468 deps_to_add.sort(key=lambda x: x.name)
468 self.add_dependencies_and_close(deps_to_add, local_scope.get('hooks', [])) 469 self.add_dependencies_and_close(deps_to_add, local_scope.get('hooks', []))
469 logging.info('ParseDepsFile(%s) done' % self.name) 470 logging.info('ParseDepsFile(%s) done' % self.name)
470 471
471 def add_dependencies_and_close(self, deps_to_add, hooks): 472 def add_dependencies_and_close(self, deps_to_add, hooks):
472 """Adds the dependencies, hooks and mark the parsing as done.""" 473 """Adds the dependencies, hooks and mark the parsing as done."""
473 for dep in sorted(deps_to_add, key=lambda x: x.name): 474 for dep in deps_to_add:
474 if dep.verify_validity(): 475 if dep.verify_validity():
475 self.add_dependency(dep) 476 self.add_dependency(dep)
476 self._mark_as_parsed(hooks) 477 self._mark_as_parsed(hooks)
477 478
478 @staticmethod 479 @staticmethod
479 def maybeGetParentRevision( 480 def maybeGetParentRevision(
480 command, options, parsed_url, parent_name, revision_overrides): 481 command, options, parsed_url, parent_name, revision_overrides):
481 """If we are performing an update and --transitive is set, set the 482 """If we are performing an update and --transitive is set, set the
482 revision to the parent's revision. If we have an explicit revision 483 revision to the parent's revision. If we have an explicit revision
483 do nothing.""" 484 do nothing."""
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1504 except (gclient_utils.Error, subprocess2.CalledProcessError), e: 1505 except (gclient_utils.Error, subprocess2.CalledProcessError), e:
1505 print >> sys.stderr, 'Error: %s' % str(e) 1506 print >> sys.stderr, 'Error: %s' % str(e)
1506 return 1 1507 return 1
1507 1508
1508 1509
1509 if '__main__' == __name__: 1510 if '__main__' == __name__:
1510 fix_encoding.fix_encoding() 1511 fix_encoding.fix_encoding()
1511 sys.exit(Main(sys.argv[1:])) 1512 sys.exit(Main(sys.argv[1:]))
1512 1513
1513 # vim: ts=2:sw=2:tw=80:et: 1514 # vim: ts=2:sw=2:tw=80:et:
OLDNEW
« no previous file with comments | « no previous file | tests/gclient_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698