Check out open gerrit topics


(Jon Haitz Legarreta Gorroño) #1

is there a way to checkout open gerrit topics that were not transitioned to GitHub?

I’d like to finish work that I left behind a while ago.

Since gerrit was put to read-only mode, searches by keywords cannot be done :sob: . The Download menu previously displayed to checkout a given Change-Id is no longer available, and I did not succeed in guessing the appropriate gerrit repository URL for checkout, e.g.

git fetch refs/changes/03/64403/2 && \
git checkout FETCH_HEAD

All references to gerrit were removed from the ITK wiki to avoid any confusion.


(Matt McCormick) #2

Hi Jon Haitz,

Thank you for taking this up! :clap:

To continue work on the patch:

First, download the patch with the Download link in the upper right of the page.


This points to the file 197a55a11b4ebf810b6e66c475d735f115362897.diff in this case.

Then, checkout a new branch in your local ITK repository from the parent commit (it can be found on the left):


cd ~/src/ITK
git checkout -b ImproveThresholdingFiltersCoverage ca0c11ccad9aa0c5c3211674e328c4ff52f54b38

and apply the patch:

git am ~/Downloads/197a55a11b4ebf810b6e66c475d735f115362897.diff

And proceed with the standard contribution process, i.e.

git commit --amend
git review-push


(Jon Haitz Legarreta Gorroño) #3

Thanks for the quick reply @matt.mccormick.

Unfortunately, the download button does not trigger any file download on my side :pensive: .

I’ve checked in two different browsers.

Note that since gerrit was freezed, I cannot log in, which I assume is the expected behavior.

Am I missing something?

(Matt McCormick) #4

With the static archive, site login is no longer, but it is not required.

Try Right click -> Save link as… or Right click -> Copy link address… and download with curl, e.g.:

$ curl -O

(Jon Haitz Legarreta Gorroño) #5

Awesome, it works :tada:

For some weird reason, Firefox was not allowing me to download the .diff file. I was able to do it using Chrome.

But thanks for providing the link, and for providing an explanation that can be helpful for other fellows that may want to pick up some of the unfinished work form gerrit :open_book:.

The additional git diff patch application steps were also appreciated.