| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 ## repo default configuration | 3 ## repo default configuration |
| 4 ## | 4 ## |
| 5 REPO_URL='https://chromium.googlesource.com/external/repo' | 5 REPO_URL='https://chromium.googlesource.com/external/repo' |
| 6 REPO_REV='stable' | 6 REPO_REV='stable' |
| 7 | 7 |
| 8 # Copyright (C) 2008 Google Inc. | 8 # Copyright (C) 2008 Google Inc. |
| 9 # | 9 # |
| 10 # Licensed under the Apache License, Version 2.0 (the "License"); | 10 # Licensed under the Apache License, Version 2.0 (the "License"); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 if ver[0] == 3: | 226 if ver[0] == 3: |
| 227 _print('warning: Python 3 support is currently experimental. YMMV.\n' | 227 _print('warning: Python 3 support is currently experimental. YMMV.\n' |
| 228 'Please use Python 2.6 - 2.7 instead.', | 228 'Please use Python 2.6 - 2.7 instead.', |
| 229 file=sys.stderr) | 229 file=sys.stderr) |
| 230 if (ver[0], ver[1]) < MIN_PYTHON_VERSION: | 230 if (ver[0], ver[1]) < MIN_PYTHON_VERSION: |
| 231 _print('error: Python version %s unsupported.\n' | 231 _print('error: Python version %s unsupported.\n' |
| 232 'Please use Python 2.6 - 2.7 instead.' | 232 'Please use Python 2.6 - 2.7 instead.' |
| 233 % sys.version.split(' ')[0], file=sys.stderr) | 233 % sys.version.split(' ')[0], file=sys.stderr) |
| 234 sys.exit(1) | 234 sys.exit(1) |
| 235 | 235 |
| 236 home_dot_repo = os.path.expanduser('~/.repoconfig') | 236 home_dot_repo = os.path.expanduser(os.path.join('~','.repoconfig')) |
| 237 gpg_dir = os.path.join(home_dot_repo, 'gnupg') | 237 gpg_dir = os.path.join(home_dot_repo, 'gnupg') |
| 238 | 238 |
| 239 extra_args = [] | 239 extra_args = [] |
| 240 init_optparse = optparse.OptionParser(usage="repo init -u url [options]") | 240 init_optparse = optparse.OptionParser(usage="repo init -u url [options]") |
| 241 | 241 |
| 242 # Logging | 242 # Logging |
| 243 group = init_optparse.add_option_group('Logging options') | 243 group = init_optparse.add_option_group('Logging options') |
| 244 group.add_option('-q', '--quiet', | 244 group.add_option('-q', '--quiet', |
| 245 dest="quiet", action="store_true", default=False, | 245 dest="quiet", action="store_true", default=False, |
| 246 help="be quiet") | 246 help="be quiet") |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 try: | 854 try: |
| 855 os.execv(sys.executable, me) | 855 os.execv(sys.executable, me) |
| 856 except OSError as e: | 856 except OSError as e: |
| 857 _print("fatal: unable to start %s" % repo_main, file=sys.stderr) | 857 _print("fatal: unable to start %s" % repo_main, file=sys.stderr) |
| 858 _print("fatal: %s" % e, file=sys.stderr) | 858 _print("fatal: %s" % e, file=sys.stderr) |
| 859 sys.exit(148) | 859 sys.exit(148) |
| 860 | 860 |
| 861 | 861 |
| 862 if __name__ == '__main__': | 862 if __name__ == '__main__': |
| 863 main(sys.argv[1:]) | 863 main(sys.argv[1:]) |
| OLD | NEW |