OLD | NEW |
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 import os | 57 import os |
58 import posixpath | 58 import posixpath |
59 import pprint | 59 import pprint |
60 import re | 60 import re |
61 import sys | 61 import sys |
62 import urlparse | 62 import urlparse |
63 import urllib | 63 import urllib |
64 | 64 |
65 import breakpad # pylint: disable=W0611 | 65 import breakpad # pylint: disable=W0611 |
66 | 66 |
67 import fix_encoding | |
68 import gclient_scm | 67 import gclient_scm |
69 import gclient_utils | 68 import gclient_utils |
70 from third_party.repo.progress import Progress | 69 from third_party.repo.progress import Progress |
71 | 70 |
72 | 71 |
73 def attr(attribute, data): | 72 def attr(attribute, data): |
74 """Sets an attribute on a function.""" | 73 """Sets an attribute on a function.""" |
75 def hook(fn): | 74 def hook(fn): |
76 setattr(fn, attribute, data) | 75 setattr(fn, attribute, data) |
77 return fn | 76 return fn |
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1260 return command(parser, argv[1:]) | 1259 return command(parser, argv[1:]) |
1261 # Not a known command. Default to help. | 1260 # Not a known command. Default to help. |
1262 GenUsage(parser, 'help') | 1261 GenUsage(parser, 'help') |
1263 return CMDhelp(parser, argv) | 1262 return CMDhelp(parser, argv) |
1264 except gclient_utils.Error, e: | 1263 except gclient_utils.Error, e: |
1265 print >> sys.stderr, 'Error: %s' % str(e) | 1264 print >> sys.stderr, 'Error: %s' % str(e) |
1266 return 1 | 1265 return 1 |
1267 | 1266 |
1268 | 1267 |
1269 if '__main__' == __name__: | 1268 if '__main__' == __name__: |
1270 fix_encoding.fix_encoding() | |
1271 sys.exit(Main(sys.argv[1:])) | 1269 sys.exit(Main(sys.argv[1:])) |
1272 | 1270 |
1273 # vim: ts=2:sw=2:tw=80:et: | 1271 # vim: ts=2:sw=2:tw=80:et: |
OLD | NEW |