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

Side by Side Diff: gclient.py

Issue 2854061: Fix misalignment (Closed)
Patch Set: Created 10 years, 5 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/python 1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 return self.parent.recursion_limit() - 1 420 return self.parent.recursion_limit() - 1
421 421
422 def tree(self, force_all): 422 def tree(self, force_all):
423 return self.parent.tree(force_all) 423 return self.parent.tree(force_all)
424 424
425 def subtree(self, force_all): 425 def subtree(self, force_all):
426 result = [] 426 result = []
427 # Add breadth-first. 427 # Add breadth-first.
428 if self.direct_reference or force_all: 428 if self.direct_reference or force_all:
429 for d in self.dependencies: 429 for d in self.dependencies:
430 result.append(d) 430 result.append(d)
431 for d in self.dependencies: 431 for d in self.dependencies:
432 result.extend(d.subtree(force_all)) 432 result.extend(d.subtree(force_all))
433 return result 433 return result
434 434
435 def get_custom_deps(self, name, url): 435 def get_custom_deps(self, name, url):
436 """Returns a custom deps if applicable.""" 436 """Returns a custom deps if applicable."""
437 if self.parent: 437 if self.parent:
438 url = self.parent.get_custom_deps(name, url) 438 url = self.parent.get_custom_deps(name, url)
439 # None is a valid return value to disable a dependency. 439 # None is a valid return value to disable a dependency.
440 return self.custom_deps.get(name, url) 440 return self.custom_deps.get(name, url)
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 return CMDhelp(parser, argv) 1151 return CMDhelp(parser, argv)
1152 except gclient_utils.Error, e: 1152 except gclient_utils.Error, e:
1153 print >> sys.stderr, 'Error: %s' % str(e) 1153 print >> sys.stderr, 'Error: %s' % str(e)
1154 return 1 1154 return 1
1155 1155
1156 1156
1157 if '__main__' == __name__: 1157 if '__main__' == __name__:
1158 sys.exit(Main(sys.argv[1:])) 1158 sys.exit(Main(sys.argv[1:]))
1159 1159
1160 # vim: ts=2:sw=2:tw=80:et: 1160 # 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