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

Side by Side Diff: git_cl.py

Issue 6791018: Add a warning if the current version of python is not 2.5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Updated to work seamlessly with python 2.5 Created 9 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 | « gclient.py ('k') | owners.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/python 1 #!/usr/bin/env python
2 # git-cl -- a git-command for integrating reviews on Rietveld 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
3 # Copyright (C) 2008 Evan Martin <martine@danga.com> 6 # Copyright (C) 2008 Evan Martin <martine@danga.com>
4 7
8 """A git-command for integrating reviews on Rietveld."""
9
5 import errno 10 import errno
6 import logging 11 import logging
7 import optparse 12 import optparse
8 import os 13 import os
9 import re 14 import re
10 import subprocess 15 import subprocess
11 import sys 16 import sys
12 import tempfile 17 import tempfile
13 import textwrap 18 import textwrap
14 import urlparse 19 import urlparse
15 import urllib2 20 import urllib2
16 21
17 try: 22 try:
18 import readline # pylint: disable=W0611 23 import readline # pylint: disable=W0611
19 except ImportError: 24 except ImportError:
20 pass 25 pass
21 26
22 try: 27 try:
23 import simplejson as json # pylint: disable=F0401 28 import simplejson as json # pylint: disable=F0401
24 except ImportError: 29 except ImportError:
25 try: 30 try:
26 import json 31 import json # pylint: disable=F0401
27 except ImportError: 32 except ImportError:
28 # Fall back to the packaged version. 33 # Fall back to the packaged version.
29 sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party')) 34 sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party'))
30 import simplejson as json 35 import simplejson as json
31 36
32 37
33 from third_party import upload 38 from third_party import upload
34 import breakpad # pylint: disable=W0611 39 import breakpad # pylint: disable=W0611
35 import fix_encoding 40 import fix_encoding
36 import presubmit_support 41 import presubmit_support
(...skipping 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 1422 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
1418 1423
1419 # Not a known command. Default to help. 1424 # Not a known command. Default to help.
1420 GenUsage(parser, 'help') 1425 GenUsage(parser, 'help')
1421 return CMDhelp(parser, argv) 1426 return CMDhelp(parser, argv)
1422 1427
1423 1428
1424 if __name__ == '__main__': 1429 if __name__ == '__main__':
1425 fix_encoding.fix_encoding() 1430 fix_encoding.fix_encoding()
1426 sys.exit(main(sys.argv[1:])) 1431 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « gclient.py ('k') | owners.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698