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 |
11 import sys | 11 import sys |
12 import tempfile | 12 import tempfile |
13 import textwrap | 13 import textwrap |
14 import urlparse | 14 import urlparse |
15 import urllib2 | 15 import urllib2 |
16 | 16 |
17 try: | 17 try: |
18 import readline # pylint: disable=W0611 | 18 import readline # pylint: disable=W0611 |
19 except ImportError: | 19 except ImportError: |
20 pass | 20 pass |
21 | 21 |
22 try: | 22 try: |
23 import simplejson as json # pylint: disable=F0401 | 23 import simplejson as json # pylint: disable=F0401 |
24 except ImportError: | 24 except ImportError: |
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 # pylint: disable=F0401 |
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 presubmit_support | 35 import presubmit_support |
36 import scm | 36 import scm |
37 import watchlists | 37 import watchlists |
38 | 38 |
39 | 39 |
40 | 40 |
(...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1406 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 1406 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
1407 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) | 1407 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) |
1408 | 1408 |
1409 # Not a known command. Default to help. | 1409 # Not a known command. Default to help. |
1410 GenUsage(parser, 'help') | 1410 GenUsage(parser, 'help') |
1411 return CMDhelp(parser, argv) | 1411 return CMDhelp(parser, argv) |
1412 | 1412 |
1413 | 1413 |
1414 if __name__ == '__main__': | 1414 if __name__ == '__main__': |
1415 sys.exit(main(sys.argv[1:])) | 1415 sys.exit(main(sys.argv[1:])) |
OLD | NEW |