summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Neus <jackneus@google.com>2021-09-23 13:59:58 +0000
committerJack Neus <jackneus@google.com>2021-09-28 16:03:21 +0000
commit7a1e7e772f3bbc67660e824c98f527b5f608ac24 (patch)
tree1e4f17eb814091e6584f8af1875a24752867daf3
parentc474c9cba1a8fbe09c219cc588d9ed334d31cd1e (diff)
downloadgit-repo-7a1e7e772f3bbc67660e824c98f527b5f608ac24.tar.gz
repo: add support for reading standalone manifests from disk
BUG=b:192664812 TEST=existing tests (no coverage), manual runs Change-Id: Ic032417ecfca77d5e0de1b1ff62b30ce8205bfc5 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/318715 Tested-by: Jack Neus <jackneus@google.com> Reviewed-by: Mike Frysinger <vapier@google.com>
-rw-r--r--fetch.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/fetch.py b/fetch.py
index 5b9997a8..91d40cda 100644
--- a/fetch.py
+++ b/fetch.py
@@ -35,4 +35,7 @@ def fetch_file(url):
35 print('fatal: error running "gsutil": %s' % e.output, 35 print('fatal: error running "gsutil": %s' % e.output,
36 file=sys.stderr) 36 file=sys.stderr)
37 sys.exit(1) 37 sys.exit(1)
38 if scheme == 'file':
39 with open(url[len('file://'):], 'rb') as f:
40 return f.read()
38 raise ValueError('unsupported url %s' % url) 41 raise ValueError('unsupported url %s' % url)