diff options
author | Jack Neus <jackneus@google.com> | 2021-09-23 13:59:58 +0000 |
---|---|---|
committer | Jack Neus <jackneus@google.com> | 2021-09-28 16:03:21 +0000 |
commit | 7a1e7e772f3bbc67660e824c98f527b5f608ac24 (patch) | |
tree | 1e4f17eb814091e6584f8af1875a24752867daf3 /fetch.py | |
parent | c474c9cba1a8fbe09c219cc588d9ed334d31cd1e (diff) | |
download | git-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>
Diffstat (limited to 'fetch.py')
-rw-r--r-- | fetch.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) |