Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: git_cl.py

Issue 10165007: Remove python 2.5 compatibility code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gcl.py ('k') | presubmit_canned_checks.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # Copyright (C) 2008 Evan Martin <martine@danga.com> 6 # Copyright (C) 2008 Evan Martin <martine@danga.com>
7 7
8 """A git-command for integrating reviews on Rietveld.""" 8 """A git-command for integrating reviews on Rietveld."""
9 9
10 import json
10 import logging 11 import logging
11 import optparse 12 import optparse
12 import os 13 import os
13 import re 14 import re
14 import stat 15 import stat
15 import sys 16 import sys
16 import textwrap 17 import textwrap
17 import urlparse 18 import urlparse
18 import urllib 19 import urllib
19 import urllib2 20 import urllib2
20 21
21 try: 22 try:
22 import readline # pylint: disable=F0401,W0611 23 import readline # pylint: disable=F0401,W0611
23 except ImportError: 24 except ImportError:
24 pass 25 pass
25 26
26 try:
27 import simplejson as json # pylint: disable=F0401
28 except ImportError:
29 try:
30 import json # pylint: disable=F0401
31 except ImportError:
32 # Fall back to the packaged version.
33 sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party'))
34 import simplejson as json # pylint: disable=F0401
35
36 27
37 from third_party import upload 28 from third_party import upload
38 import breakpad # pylint: disable=W0611 29 import breakpad # pylint: disable=W0611
39 import fix_encoding 30 import fix_encoding
40 import gclient_utils 31 import gclient_utils
41 import presubmit_support 32 import presubmit_support
42 import rietveld 33 import rietveld
43 import scm 34 import scm
44 import subprocess2 35 import subprocess2
45 import watchlists 36 import watchlists
(...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1544 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 1535 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
1545 1536
1546 # Not a known command. Default to help. 1537 # Not a known command. Default to help.
1547 GenUsage(parser, 'help') 1538 GenUsage(parser, 'help')
1548 return CMDhelp(parser, argv) 1539 return CMDhelp(parser, argv)
1549 1540
1550 1541
1551 if __name__ == '__main__': 1542 if __name__ == '__main__':
1552 fix_encoding.fix_encoding() 1543 fix_encoding.fix_encoding()
1553 sys.exit(main(sys.argv[1:])) 1544 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « gcl.py ('k') | presubmit_canned_checks.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698