You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Button to get all open Gerrit patch sets and show them as references.
An automatic fetch should be done before getting the patch sets to show the latest state of the branches.
It should be done recursively in case of submodules.
Could look like this:
... you can see all 3 patch sets of the open change
Use case
Sometimes it is useful to see all open Gerrit patch sets in the local repo.
So you can do local diffs between two selected patch sets with your favorite diff tool.
Getting all of them at once is useful in case other people did some work in this repo (or it's subrepos).
The text was updated successfully, but these errors were encountered:
As a proof of concept I wrote a litte bash script for this (single repo only, but should be possible to do it for submodules also).
It does several steps:
cleanup (remove refs as they might be outdated): git show-ref --abbrev | grep changes | sed s%.*refs%refs% | xargs -P 5 -r -n 1 git update-ref -d
get refs of open changes from Gerrit (one could easily add additional query filters like a topic): ssh -p 29418 $USERNAME@$SERVERNAME gerrit query --current-patch-set project:$GITPRJ_NAME AND is:open | grep ref: | sed -E 's%\ \ \ \ ref:\ (refs/changes/.*/).*%\1*%' | xargs -P 5 -r -n 1 sub_getchange.sh where sub_getchange.sh does git fetch -q --recurse-submodules=no origin $1:$1
remove Gerrit's meta-refs as they are internal only (of course it would be better to not fetch them in the previous step but I couldn't get this done): git show-ref --abbrev | grep meta | sed s%.*refs%refs% | xargs -P 5 -r -n 1 git update-ref -d
Feature description
Button to get all open Gerrit patch sets and show them as references.
An automatic fetch should be done before getting the patch sets to show the latest state of the branches.
It should be done recursively in case of submodules.
Could look like this:
![image](https://user-images.githubusercontent.com/66664896/151313666-6b94281e-ce07-4181-9a0f-cc9f093c7473.png)
... you can see all 3 patch sets of the open change
Use case
Sometimes it is useful to see all open Gerrit patch sets in the local repo.
So you can do local diffs between two selected patch sets with your favorite diff tool.
Getting all of them at once is useful in case other people did some work in this repo (or it's subrepos).
The text was updated successfully, but these errors were encountered: