Questions tagged [git-review]

git-review is a CLI tool for Git / Gerrit that facilitates communication with Gerrit Code Review when using command line.

git-review tool adds a new git review command. It allows to push changes for reviews, download them, rebase to reflect newest modifications in destination branch, regenerate commits' Change-Id in batch and more.

Tool is written in Python. Its documentation and sources are available at github.

43 questions
0
votes
0 answers

`git-review` after `git commit --amend -F file` - a new review?

I used to do git amend in the following simple way git commit --amend. Recently I started using message from file option (-F), like so: git commit --amend -F my_git_message.txt. My workflow includes git-review tool which I call after each commit:…
Danijel
  • 8,198
  • 18
  • 69
  • 133
0
votes
1 answer

Gerrit HEAD:refs/publish/master blocks change

When trying to upload my changes to gerrit with git review I am getting this error message: Fetching gerrit 2018-01-26 13:33:52.161429 Running: git rev-parse HEAD 2018-01-26 13:33:52.166465 Running: git show-ref --quiet --verify…
Mario
  • 335
  • 7
  • 20
0
votes
1 answer

How to I batch comment gerrit reviews?

I am looking for a CLI solution for adding a comment to a set of gerrit review returned by using its query interface. Imagine that I have query string like "project:foobar branch:obsoleted status:open" and I want to notify all users to abandon…
sorin
  • 161,544
  • 178
  • 535
  • 806
0
votes
1 answer

How do I detect that gerrit change needs rebasing on Jenkins?

I want to fail-fast on Gerrit triggered Jenkins jobs when the changes are outdated and they need rebasing by adding a piece of code at the start of the job that triggers and error: "Rebase your change first." You can find the list of Jenkins…
sorin
  • 161,544
  • 178
  • 535
  • 806
0
votes
2 answers

Is 'git review' a forced push in Gerrit?

I am bit confused about how git review works ? I got the official documentation here fine manual but am still unable to understand how modifying a downloaded change and then comitting and pushing it using git commit --amend and git review works with…
mittal
  • 915
  • 10
  • 29
0
votes
1 answer

Why is branch gerrit/master so far behind?

Every time I checkout to a review branch using git-review like: j ❯❯❯ git-review -d 5779 Downloading refs/changes/79/5779/1 from gerrit Switched to branch "review/jezor/5779" the status command tells me I'm way ahead the gerrit/master branch: j ❯❯❯…
Jezor
  • 3,253
  • 2
  • 19
  • 43
0
votes
1 answer

How split a huge code to small patches in Gerrit

Currently, I want to contribute to OpenStack and I am new to Gerrit. In Gerrit, I created a new branch my_branch but actually my code is very huge. Please kindly let me know how I can split my code to smaller changes with the same branch my_branch.
0
votes
0 answers

Git Push Review Process

I used to work with git and gitHub. Mostly doing branches and then submit push request from branches. And used gitHub review. But, thing is a little bit different here: We use rebase and cherry-pick a lot. And we are using a review server, so when…
user1947415
  • 933
  • 4
  • 14
  • 31
0
votes
2 answers

convert a non-git project to a git project and push it to gerrit repo

i am trying to learn about git and gerrit for a couple days, and there is some error that i can not find a proper solution to it. Here is the error message; *asfaa@asadaf:~/test$ git review -R Could not connect to gerrit. Enter your gerrit username:…
caneru
  • 391
  • 1
  • 2
  • 15
0
votes
2 answers

Pushing a specific ancestral commit with Gerrit and git-review

Say I have a Git history that looks like this, for newest to oldest: * C: WIP: Latest change * B: WIP: Older changer * A: Groundwork/housekeeping - review ready * (origin/master) Existing master commit * ... Commits B and C are work in progress,…
Inductiveload
  • 6,094
  • 4
  • 29
  • 55
0
votes
1 answer

gerrit - checkout change-set by "number"

I can retrieve a list of drafts for the current owner like this: ssh -p 29418 gerritServer.com gerrit query projectName owner:self is:draft In the output is a "number" field which the git-review tool uses as input for it's git-review -d …
Jonathan.Brink
  • 23,757
  • 20
  • 73
  • 115
0
votes
1 answer

Add reviewers to gerrit

I've read the Question ID:Gerrit Add Reviewers However, my requirements are a little different. I have not given my users "push" rights, hence git push tr:kernel/common HEAD:refs/for/experimental%r=a@a.com,r=b@b.com,cc=c@c.com will be redundant for…
Yo Yo Money Singh
  • 679
  • 3
  • 11
  • 22
0
votes
1 answer

Gerrit push to review answer Change..closed

I am trying to publish a commit i've made and had to rebase before pushing, now my branch is up-to-date but when I do git review it ask a question: [user]$ git review *originbranch* **You are about to submit multiple commits. This is expected if…
Ben Diamant
  • 6,186
  • 4
  • 35
  • 50
1 2
3