OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # git-cl -- a git-command for integrating reviews on Rietveld | 2 # git-cl -- a git-command for integrating reviews on Rietveld |
3 # Copyright (C) 2008 Evan Martin <martine@danga.com> | 3 # Copyright (C) 2008 Evan Martin <martine@danga.com> |
4 | 4 |
5 import errno | 5 import errno |
6 import logging | 6 import logging |
7 import optparse | 7 import optparse |
8 import os | 8 import os |
9 import re | 9 import re |
10 import subprocess | 10 import subprocess |
(...skipping 14 matching lines...) Expand all Loading... |
25 try: | 25 try: |
26 import json | 26 import json |
27 except ImportError: | 27 except ImportError: |
28 # Fall back to the packaged version. | 28 # Fall back to the packaged version. |
29 sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party')) | 29 sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party')) |
30 import simplejson as json | 30 import simplejson as json |
31 | 31 |
32 | 32 |
33 from third_party import upload | 33 from third_party import upload |
34 import breakpad # pylint: disable=W0611 | 34 import breakpad # pylint: disable=W0611 |
| 35 import fix_encoding |
35 import presubmit_support | 36 import presubmit_support |
36 import scm | 37 import scm |
37 import watchlists | 38 import watchlists |
38 | 39 |
39 | 40 |
40 | 41 |
41 DEFAULT_SERVER = 'http://codereview.appspot.com' | 42 DEFAULT_SERVER = 'http://codereview.appspot.com' |
42 POSTUPSTREAM_HOOK_PATTERN = '.git/hooks/post-cl-%s' | 43 POSTUPSTREAM_HOOK_PATTERN = '.git/hooks/post-cl-%s' |
43 DESCRIPTION_BACKUP_FILE = '~/.git_cl_description_backup' | 44 DESCRIPTION_BACKUP_FILE = '~/.git_cl_description_backup' |
44 | 45 |
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 DieWithError( | 1406 DieWithError( |
1406 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1407 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
1407 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) | 1408 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) |
1408 | 1409 |
1409 # Not a known command. Default to help. | 1410 # Not a known command. Default to help. |
1410 GenUsage(parser, 'help') | 1411 GenUsage(parser, 'help') |
1411 return CMDhelp(parser, argv) | 1412 return CMDhelp(parser, argv) |
1412 | 1413 |
1413 | 1414 |
1414 if __name__ == '__main__': | 1415 if __name__ == '__main__': |
| 1416 fix_encoding.fix_encoding() |
1415 sys.exit(main(sys.argv[1:])) | 1417 sys.exit(main(sys.argv[1:])) |
OLD | NEW |