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

Side by Side Diff: gclient.py

Issue 2808062: Fix docstring to be a docstring. (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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 439
440 for d in self.dependencies: 440 for d in self.dependencies:
441 out.extend([' ' + x for x in str(d).splitlines()]) 441 out.extend([' ' + x for x in str(d).splitlines()])
442 out.append('') 442 out.append('')
443 return '\n'.join(out) 443 return '\n'.join(out)
444 444
445 def __repr__(self): 445 def __repr__(self):
446 return '%s: %s' % (self.name, self.url) 446 return '%s: %s' % (self.name, self.url)
447 447
448 def hierarchy(self): 448 def hierarchy(self):
449 "Returns a human-readable hierarchical reference to a Dependency." 449 """Returns a human-readable hierarchical reference to a Dependency."""
450 out = '%s(%s)' % (self.name, self.url) 450 out = '%s(%s)' % (self.name, self.url)
451 i = self.parent 451 i = self.parent
452 while i and i.name: 452 while i and i.name:
453 out = '%s(%s) -> %s' % (i.name, i.url, out) 453 out = '%s(%s) -> %s' % (i.name, i.url, out)
454 i = i.parent 454 i = i.parent
455 return out 455 return out
456 456
457 457
458 class GClient(Dependency): 458 class GClient(Dependency):
459 """Object that represent a gclient checkout. A tree of Dependency(), one per 459 """Object that represent a gclient checkout. A tree of Dependency(), one per
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 return CMDhelp(parser, argv) 1150 return CMDhelp(parser, argv)
1151 except gclient_utils.Error, e: 1151 except gclient_utils.Error, e:
1152 print >> sys.stderr, 'Error: %s' % str(e) 1152 print >> sys.stderr, 'Error: %s' % str(e)
1153 return 1 1153 return 1
1154 1154
1155 1155
1156 if '__main__' == __name__: 1156 if '__main__' == __name__:
1157 sys.exit(Main(sys.argv[1:])) 1157 sys.exit(Main(sys.argv[1:]))
1158 1158
1159 # vim: ts=2:sw=2:tw=80:et: 1159 # 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