How to pull a change currently under review?

5,578 views
Skip to first unread message

Markus Stauffiger

unread,
Feb 3, 2012, 7:37:08 AM2/3/12
to Repo and Gerrit Discussion
Dear list

Situation: An other programmer pushed something for review to be
merged into master. Now I would like to pull his changes to my
computer to e.g. do some testing. How do I do that?

Best regards
Markus

Saša Živkov

unread,
Feb 3, 2012, 7:53:39 AM2/3/12
to Markus Stauffiger, Repo and Gerrit Discussion

Open the change in Gerrit UI and in the "Download" section for each
patch set you will find already prepared Git command for downloading
the change to your local Git repository.
Chose if you want to checkout/pull/cherry-pick/patch and also chose
the protocol (ssh/http/...)
Click the copy-to-clipboard icon, paste the command in your shell and
execute the command.

Markus Stauffiger

unread,
Feb 3, 2012, 7:57:38 AM2/3/12
to Repo and Gerrit Discussion
Thank you very much, as you see we're still very new to gerrit!

Magnus Bäck

unread,
Feb 3, 2012, 7:58:22 AM2/3/12
to Repo and Gerrit Discussion
On Friday, February 03, 2012 at 13:37 CET,
Markus Stauffiger <mar...@4eyes.ch> wrote:

> Situation: An other programmer pushed something for review to be
> merged into master. Now I would like to pull his changes to my
> computer to e.g. do some testing. How do I do that?

In the "Patch Set N" pane on the page of a change there's a "Download"
headline under which you'll find a number of options to obtain the code
of the change. Which one you should use depends a little bit on what you
want to do. The "repo download" and "checkout" options will download
check out the exact commit as uploaded. You can then choose to make
additional commits on top of it, or just test the uploaded code as-is.
You should probably stay clear of the "pull" option; there might be
problems to which it's the best solution, but I don't believe I've
encountered any yet. The "cherry-pick" option can e.g. be used to rebase
a commit onto either the tip of the branch (to prepare a new patch set)
or onto another branch if you e.g. realize the same bugfix is needed in
multiple places.

--
Magnus Bäck
ba...@swipnet.se

Reply all
Reply to author
Forward
0 new messages