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