Mike Frysinger
e15b3e0298
style: use import urllib.xxx everywhere
...
Align with Google style guides and `import urllib.xxx` as a module
rather than import symbols out of it.
Change-Id: Ia177f4fd5ee2a3f38f8a8860e9a2ba8beac8078f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/654804
Reviewed-by: Brian Gan <brgan@google.com >
Tested-by: Mike Frysinger <vapier@google.com >
Commit-Queue: Mike Frysinger <vapier@google.com >
2026-11-06 11:56:05 -08:00
Mike Frysinger
2c04b98c60
style: use import error everywhere
...
Align with Google style guides and `import error` as a module rather
than import classes out of it.
Change-Id: I8686fbe7887bd6ceac7a07877af63934f0d0ddd2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/647563
Commit-Queue: Mike Frysinger <vapier@google.com >
Reviewed-by: Gavin Mak <gavinmak@google.com >
Reviewed-by: Insaf Latypov <saferif@google.com >
Tested-by: Mike Frysinger <vapier@google.com >
2026-10-22 17:44:11 -07:00
gurusai-voleti
a94c9e2b52
Automated: Migrate gerrit/git-repo from gsutil to gcloud storage
...
Bug: 486536908
Change-Id: I248b093e189a3784b8959e837a5d66857f1ce0fc
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/577201
Reviewed-by: Gavin Mak <gavinmak@google.com >
Tested-by: Guru sai rama subbarao Voleti (xWF) <gvoleti@google.com >
Commit-Queue: Guru sai rama subbarao Voleti (xWF) <gvoleti@google.com >
2026-05-14 21:31:49 -07:00
Mike Frysinger
6447733eb2
isort: format codebase
...
Change-Id: I6f11d123b68fd077f558d3c21349c55c5f251019
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/383715
Reviewed-by: Gavin Mak <gavinmak@google.com >
Tested-by: Mike Frysinger <vapier@google.com >
Commit-Queue: Mike Frysinger <vapier@google.com >
2023-08-22 18:32:22 +00:00
Jason Chang
f9aacd4087
Raise repo exit errors in place of sys.exit
...
Bug: b/293344017
Change-Id: I92d81c78eba8ff31b5252415f4c9a515a6c76411
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/381774
Tested-by: Jason Chang <jasonnc@google.com >
Reviewed-by: Joanna Wang <jojwang@google.com >
Commit-Queue: Jason Chang <jasonnc@google.com >
2023-08-07 23:56:07 +00:00
Gavin Mak
ea2e330e43
Format codebase with black and check formatting in CQ
...
Apply rules set by https://gerrit-review.googlesource.com/c/git-repo/+/362954/ across the codebase and fix any lingering errors caught
by flake8. Also check black formatting in run_tests (and CQ).
Bug: b/267675342
Change-Id: I972d77649dac351150dcfeb1cd1ad0ea2efc1956
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/363474
Reviewed-by: Mike Frysinger <vapier@google.com >
Tested-by: Gavin Mak <gavinmak@google.com >
Commit-Queue: Gavin Mak <gavinmak@google.com >
2023-03-22 17:46:28 +00:00
Matt Story
11b30b91df
Support more url schemes for getting standalone manifest
...
urllib.requests.urlopen also supports file, so call it unless the
scheme is 'gs'. This adds http, https, and ftp support.
Change-Id: I3f215c3ebd8e6dee29ba14c7e79ed99d37287109
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/322095
Reviewed-by: Michael Kelly <mkelly@arista.com >
Reviewed-by: Mike Frysinger <vapier@google.com >
Tested-by: Matt Story <mstory@arista.com >
2021-10-27 13:20:35 +00:00
Jack Neus
198838599c
fetch: Fix stderr handling for gsutil
...
Previously gsutil stderr was getting piped into stdout, which
yields bad results if there are non-fatal warnings in stderr.
Additionally, we should fail outright if gsutil fails (by adding
`check = True`) rather than fail later on when we try to sync to
a manifest that is in fact just a stderr dump.
BUG=none
TEST=manual runs with bad gs urls
Change-Id: Id71791d0c3f180bd0601ef2c783a8e8e4afa8f59
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/321935
Tested-by: Jack Neus <jackneus@google.com >
Reviewed-by: Mike Frysinger <vapier@google.com >
2021-10-26 22:18:28 +00:00
Jack Neus
7a1e7e772f
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 >
2021-09-28 16:03:21 +00:00
Jack Neus
c474c9cba1
repo: Add support for standalone manifests
...
Added --standalone_manifest to repo tool. If set, the
manifest is downloaded directly from the appropriate source
(currently, we only support GS) and used instead of creating
a manifest git checkout. The manifests.git repo is still created to
keep track of various config but is marked as being for a standalone
manifest so that the repo tool doesn't try to run networked git
commands in it.
BUG=b:192664812
TEST=existing tests (no coverage), manual runs
Change-Id: I84378cbc7f8e515eabeccdde9665efc8cd2a9d21
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/312942
Tested-by: Jack Neus <jackneus@google.com >
Reviewed-by: Mike Frysinger <vapier@google.com >
2021-09-28 15:40:46 +00:00