OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """Client-side script to send a try job to the try server. It communicates to | 6 """Client-side script to send a try job to the try server. It communicates to |
7 the try server by either writting to a svn/git repository or by directly | 7 the try server by either writting to a svn/git repository or by directly |
8 connecting to the server by HTTP. | 8 connecting to the server by HTTP. |
9 """ | 9 """ |
10 | 10 |
11 import contextlib | 11 import contextlib |
12 import datetime | 12 import datetime |
13 import errno | 13 import errno |
14 import getpass | 14 import getpass |
15 import itertools | 15 import itertools |
16 import json | 16 import json |
17 import logging | 17 import logging |
18 import optparse | 18 import optparse |
19 import os | 19 import os |
20 import posixpath | 20 import posixpath |
21 import re | 21 import re |
22 import shutil | 22 import shutil |
23 import sys | 23 import sys |
24 import tempfile | 24 import tempfile |
25 import urllib | 25 import urllib |
26 import urllib2 | 26 import urllib2 |
27 import urlparse | 27 import urlparse |
28 | 28 |
29 import breakpad # pylint: disable=W0611 | |
30 | |
31 import fix_encoding | 29 import fix_encoding |
32 import gcl | 30 import gcl |
33 import gclient_utils | 31 import gclient_utils |
34 import gerrit_util | 32 import gerrit_util |
35 import scm | 33 import scm |
36 import subprocess2 | 34 import subprocess2 |
37 | 35 |
38 | 36 |
39 __version__ = '1.2' | 37 __version__ = '1.2' |
40 | 38 |
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 return 1 | 1256 return 1 |
1259 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 1257 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
1260 print >> sys.stderr, e | 1258 print >> sys.stderr, e |
1261 return 1 | 1259 return 1 |
1262 return 0 | 1260 return 0 |
1263 | 1261 |
1264 | 1262 |
1265 if __name__ == "__main__": | 1263 if __name__ == "__main__": |
1266 fix_encoding.fix_encoding() | 1264 fix_encoding.fix_encoding() |
1267 sys.exit(TryChange(None, None, False)) | 1265 sys.exit(TryChange(None, None, False)) |
OLD | NEW |