To make the script can be used from automatic scripts, introduce
`--current-branch` argument which allows pulling commits to the current
branch without creating a local branch. It will skip the prompt which
asking about the creation of a local branch.
Test: With --current-branch argument, the script doesn't ask setting
local branch name.
Change-Id: Iff3cdebe6338bb2be738e60047d5c4dd81cde4f0
Signed-off-by: Junghoon Jang <junghoonjang@google.com>
In the case of one source tree containing multiple repos with the same
project, but different branches, the script won't sync them properly.
To fix it, make it consider the branch along with the project.
Test: Tested syncing well in the directory which contains multiple repos
with the same project, but different branches.
Change-Id: I9d1add4ffe85f80f8f9d6a3ae2c046473d7c4631
Signed-off-by: Junghoon Jang <junghoonjang@google.com>
This commit adds a CURL command hook. This enables the Gerrit REST API
access through other authentication mechanisms.
Bug: b/269362063
Test: Run gerrit.py, repo_patch.py, repo_review.py with --use-curl=curl
Change-Id: I6dc4eb78760ee598df5065665c15d689916706f0
Test: "development/tools/repo_pull/repo_pull.py pull ..." on a large topic
from a manifest with includes.
Bug: 140113116
Change-Id: I781c9a3ca0bcdf53cc8ed1896b3ec12389e4e797
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
This commit renames `process` to `proc` to eliminate an undefined
variable in the except clause.
Test: pylint repo_pull.py
Change-Id: Ie0d350f2c2e0b0e3eed037227dd15839e460d44e
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
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
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
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
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