Rob Seymour
7f265b92fa
Extend gerrit query to handle all changes in a topic.
...
Handle _more_changes property to download all changes in a query
Add multiple print formats (JSON, oneline) to gerrit.py CLI
Bug: 200079625
Test: gerrit.py
Test: gerrit.py --verbose
Test: gerrit.py --start 10 --limits 10
Test: gerrity.py --start 50000 // Validate bad start index
Test: repo_review.py // Validate Change Lists: returned
Test: repo_patch.py // Validate patch created for all changes
Test: repo_pull.py bash // Validate commands exists for all changes
Change-Id: I532eb2f709aff29cf9c8ff7fc428d53b5c607101
2021-09-23 19:26:13 +00:00
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
Taesu Lee
6c7a793c78
repo-review: Add a 'restore' command line option
...
This CL enables repo_review.py to restore CL(s).
Test: repo-review.py -g [url] [query] --restore
Signed-off-by: Taesu Lee <taesu82.lee@samsung.com >
Change-Id: Ia1e84b35dbae453feba338fea1d1f101620cfa06
2021-04-26 11:54:25 +09:00
Yo Chiang
36d90eeea2
Strip gerrit url trailing slash
...
Test: ./development/tools/repo_pull/repo_review.py 'topic:"..."' --set-topic "..."
Change-Id: Ifaadfdd3ecd615bbe6948be46ac91a15373bdc3b
2020-08-07 12:42:50 +08:00
Yo Chiang
9520c3f968
Merge "repo_pull: Disable bare-except warning"
2020-07-20 08:48:56 +00:00
Luca Stefani
edc569c60c
repo_pull: Disable bare-except warning
...
Change-Id: I6a4af635811dc5d807196812e7782070fe230990
2020-07-16 11:58:31 +00:00
Luca Stefani
5e45299741
repo_pull: Fix ungrouped-imports warnings
...
Change-Id: Ie34a8130e04cbfaa99beb6566cd07662011bdbc9
2020-07-15 09:20:36 +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
Po-Chien Hsueh
4e83237bb5
repo-review: Add a 'submit' command line option
...
This CL enables repo_review.py to submit CL(s).
Test: repo-review.py -g [url] [query] --submit
Change-Id: I9ecdc2b97bb0250597d76ef2d39596f66182530f
2020-05-21 07:13:24 +00:00
Yo Chiang
5f451a4676
repo_pull: Refactor error handling
...
* repo_review.py requests all go through _make_json_post_request()
* _make_json_post_request() gracefully handles exceptions
* _print_error() prints json or plain text response
* Add some docstrings
Test: ./repo_review.py --add-reviewer [invalid username] [query]
Test: ./repo_review.py --add-reviewer [ambiguous username] [query]
Test: ./repo_review.py --delete-reviewer [invalid username] [query]
Test: ./repo_review.py --delete-topic [query]
Change-Id: I900ef416bb4195d6fb4d72b0c4f53f3fd78a6e7e
2020-05-04 03:23:15 +00:00
Yo Chiang
dc9a2b7ec9
repo_pull: Handle abnormal responses
...
urllib.error.HTTPError works as a http response object (same type that
urlopen() returns). Handle the exception by reading and parsing the
response body of the error.
Test: ./repo_review.py --add-reviewer [invalid username] [query]
Test: ./repo_review.py --add-reviewer [ambiguous username] [query]
Change-Id: Ibfc261d83f2f9efd7873835f74ce8d5e980821c9
2020-04-21 02:56:08 +00:00
Yo Chiang
c8827d1fd8
repo_review: Add --add-reviewer, --delete-reviewer
...
Test: ./repo_review.py --add-reviewer [lint bot] [query]
Test: ./repo_review.py --delete-reviewer [lint bot] [query]
Change-Id: I2c9001ef83e48656053db1dbfe7d373ce2b26eea
2020-04-20 17:00:30 +08:00
Logan Chien
2da2f27813
repo-review: Add set/delete topic and set hashtags
...
Test: ./repo_review.py --set-topic test [query]
Test: ./repo_review.py --delete-topic [query]
Test: ./repo_review.py --add-hashtag test [query]
Test: ./repo_review.py --remove-hashtag test [query]
Change-Id: Ie7a1b82022d81850754543366202892c437f7968
2018-09-07 19:13:11 +08:00
Logan Chien
63be158fc6
repo-review: Extract _make_json_post_request()
...
Test: ./repo_review --label Verify +1 [query]
Change-Id: Iaf4016c7d2d606a3c3fb29303d8f3d978820eefe
2018-09-07 11:48:10 +08:00
Logan Chien
b260a60264
repo-review: Add abandon command line option
...
This commit adds `--abandon` comand line option to abandon several
change lists.
Test: repo-review.py -g [url] [query] --abandon '[reason]'
Change-Id: I5360e95a284a2d3e77a66d52ea01cec7872b9334
2018-07-03 10:29:30 +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
Bowgo Tsai
33b91c1932
repo-review: Fix missing imports
...
Bug: None
Test: ./repo_review.py -g [gerrit] query -l Code-Review +2
Change-Id: Iafac171193299ec3894f9674df08cbdcc213af8b
2018-06-08 17:00:46 +08:00
Logan Chien
4721aa1eed
repo-patch: Download patch files from Gerrit
...
This commit adds a utility to download multiple patch files from Gerrit
by a change list query.
Test: repo_patch.py -g [gerrit] [query]
Change-Id: I3685c48d2ea4e5a9fa1915c4e31bc6ebb2d4ed97
2018-06-07 11:02:01 +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