Commit Graph

14 Commits

Author SHA1 Message Date
Logan Chien
4ee322f25b repo-review: Trim trailing slashes to avoid errors
Bug: b/170858163
Change-Id: I3de16ad77f0436af97eae26816fc99493fba30c3
2021-07-19 14:59:29 -07:00
Luca Stefani
edc569c60c repo_pull: Disable bare-except warning
Change-Id: I6a4af635811dc5d807196812e7782070fe230990
2020-07-16 11:58:31 +00:00
Luca Stefani
bd2e580b4d repo_pull: Automatically extract gerrit instance from repo manifest
Test: ./development/tools/repo_pull/repo_pull.py pull topic:hidl-vndk
Change-Id: I44974ec5df65e404591d35c39238d58207001110
2020-07-13 18:02:45 +00:00
Yo Chiang
8eb3d4fae0 Refine repo_pull.py
Use `repo manifest` command to retrieve manifest.
Change working directory to $ANDROID_BUILD_TOP before executing
commands.

Bug: 159346230
Test: ./repo_pull.py bash '<some commit query>' \
  -g https://android-review.googlesource.com
Change-Id: Ie5d29a4ae7b4b0e00c0900c8445e318dac807c77
2020-06-24 18:54:15 +08:00
Martin Stjernholm
0c28099695 Support <include> directives in manifests.
Test: "development/tools/repo_pull/repo_pull.py pull ..." on a large topic
  from a manifest with includes.
Bug: 140113116
Change-Id: I781c9a3ca0bcdf53cc8ed1896b3ec12389e4e797
2019-08-27 18:45:46 +01:00
Logan Chien
028c2c112b repo-pull: Handle project-not-found error
This commit add an error handler for project-not-found errors, so that
the failure of mapping one project does not stop us from pulling CLs for
other projects.

Test: repo_pull -g [gerrit] [query]
Change-Id: Ied9d400a09c032418cd345dc076948b06058aec4
2018-08-08 17:00:52 +08:00
Logan Chien
bfb414f033 repo-pull: Fix pylint errors
This commit adds several pylint fixes.

Test: for i in *.py; do pylint $i; done
Change-Id: Ie7318b616ef75c2944a4c03185f49b2a3f02db50
2018-06-15 16:06:56 +08:00
Logan Chien
ecd9846942 repo-pull: Fix undefined variable in except clause
This commit renames `process` to `proc` to eliminate an undefined
variable in the except clause.

Test: pylint repo_pull.py
Change-Id: Ie0d350f2c2e0b0e3eed037227dd15839e460d44e
2018-06-15 14:39:24 +08:00
Logan Chien
e9b0d96cf0 repo-pull: Support more git fetch protocols
This commit adds sso and rpc to git fetch commands.

Test: repo_pull.py pull -g [gerrit] [query]
Change-Id: Iad120cef4460ccc67b723467be638cc9299925fe
2018-06-06 18:32:50 +08:00
Logan Chien
3f67c28b52 repo-pull: Check Gerrit Code Review domain name
This commit adds a search on Gerrit Code Review URL so that a better
error message can be shown to users and the setup instructions can be
presented.

Test: repo_pull.py json -g [gerrit] [query]
Test: repo_review.py -g [gerrit] [query] -l Code-Review 2
Change-Id: I1f819c51e34c573f526ca3e30e237cdaf8a27160
2018-06-06 18:16:31 +08:00
Logan Chien
36d5edd405 repo-pull: Add --pick for non-merge commits
This commit adds the `--pick` command line option so that users can
choose the git command for the non-merge commits.

Test: repo_pull.py pull -g GERRIT QUERY -p merge-ff-only
Change-Id: Ib8bdaa1418dc2fb48d0f0e3c4eb995a23c007563
2018-04-20 18:29:48 +08:00
Logan Chien
1e026cfcc4 repo-pull: Allow to ignore local branch name
This commit allows users to omit `--branch` from command line options.
`repo_pull.py` will not call `repo start` if `--branch` is unspecified.

Test: repo_pull.py bash -g GERRIT QUERY
Change-Id: I62380485f057bd35ab8ae4d5e70372ff5d05fcc5
2018-04-20 18:29:48 +08:00
Logan Chien
9d19090823 repo-pull: Add checkout for merge commits
This commit adds `-m checkout` for merge commits.  If `-m checkout` is
specified, `repo_pull.py` will pull the merge commits with
`git checkout FETCH_HEAD`.

Test: repo_pull.py bash -g GERRIT QUERY -m checkout -b local_branch_name
Change-Id: I6cbedbd2941c63c8bb0591b6033a136829ffda47
2018-04-20 18:29:44 +08:00
Logan Chien
9fefa74796 repo-pull: Add repo_pull.py to pull multiple CLs
With `repo_pull.py`, users can specify a query string and pull all
matching change lists from Gerrit.

Test: repo_pull.py pull -g GERRIT QUERY
Change-Id: I1c64c9d630ab37f94276fde7a654f322ac3aa43c
2018-03-27 20:35:23 +08:00