Commit 0582a44d authored by Matthias Putz's avatar Matthias Putz

repo cmd adaption

parent 5d50e056
#!/usr/bin/env python #!/usr/bin/env python
import sys
import portable
if sys.version_info[0] < 3:
print('git-repo is written for python3, your version is %s, please upgrade from www.python.org.' % sys.version)
exit(0)
## repo default configuration ## repo default configuration
## ##
from __future__ import print_function REPO_URL = 'ssh://gerrit/Tools/git-repo'
REPO_URL = 'https://gerrit.googlesource.com/git-repo'
REPO_REV = 'stable' REPO_REV = 'stable'
# Copyright (C) 2008 Google Inc. # Copyright (C) 2008 Google Inc.
...@@ -21,7 +27,7 @@ REPO_REV = 'stable' ...@@ -21,7 +27,7 @@ REPO_REV = 'stable'
# limitations under the License. # limitations under the License.
# increment this whenever we make important changes to this script # increment this whenever we make important changes to this script
VERSION = (1, 19) VERSION = (1, 19, 1)
# increment this if the MAINTAINER_KEYS block is modified # increment this if the MAINTAINER_KEYS block is modified
KEYRING_VERSION = (1, 1) KEYRING_VERSION = (1, 1)
...@@ -115,7 +121,6 @@ import os ...@@ -115,7 +121,6 @@ import os
import re import re
import stat import stat
import subprocess import subprocess
import sys
import urllib.request import urllib.request
import urllib.error import urllib.error
...@@ -257,7 +262,7 @@ def _CheckGitVersion(): ...@@ -257,7 +262,7 @@ def _CheckGitVersion():
file=sys.stderr) file=sys.stderr)
raise CloneFailure() raise CloneFailure()
ver_str = proc.stdout.read().strip() ver_str = portable.stream2str(proc.stdout.read()).strip()
proc.stdout.close() proc.stdout.close()
proc.wait() proc.wait()
...@@ -490,7 +495,7 @@ def _Verify(cwd, branch, quiet): ...@@ -490,7 +495,7 @@ def _Verify(cwd, branch, quiet):
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, stderr=subprocess.PIPE,
cwd = cwd) cwd = cwd)
cur = proc.stdout.read().strip() cur = portable.stream2str(proc.stdout.read()).strip()
proc.stdout.close() proc.stdout.close()
proc.stderr.read() proc.stderr.read()
...@@ -663,7 +668,7 @@ def _SetDefaultsTo(gitdir): ...@@ -663,7 +668,7 @@ def _SetDefaultsTo(gitdir):
'HEAD'], 'HEAD'],
stdout = subprocess.PIPE, stdout = subprocess.PIPE,
stderr = subprocess.PIPE) stderr = subprocess.PIPE)
REPO_REV = proc.stdout.read().strip() REPO_REV = portable.stream2str(proc.stdout.read()).strip()
proc.stdout.close() proc.stdout.close()
proc.stderr.read() proc.stderr.read()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment