How do I make a relation chain in gerrit?

2,731 views
Skip to first unread message

Brad Triebwasser

unread,
Apr 8, 2024, 3:47:27 PM4/8/24
to Repo and Gerrit Discussion
I see mentions of "relation chain" in the gerrit documentation (e.g. here),  but I can't find any documentation on how to actually create a relation chain, or set a parent change for a given change. This discussion talks about ancestor changes, but I'm not able to find and gerrit documentation on how to create an ancestor chain.

Can anyone point me to the documentation for this?

Regards,
Brad


Matthias Sohn

unread,
Apr 8, 2024, 4:00:16 PM4/8/24
to Brad Triebwasser, Repo and Gerrit Discussion
On Mon, Apr 8, 2024 at 9:47 PM Brad Triebwasser <btr...@chromium.org> wrote:
I see mentions of "relation chain" in the gerrit documentation (e.g. here),  but I can't find any documentation on how to actually create a relation chain, or set a parent change for a given change. This discussion talks about ancestor changes, but I'm not able to find and gerrit documentation on how to create an ancestor chain.

Every git commit has a pointer to its parent commit (except one or few commits at the roots of the version graph).
The relation chain is a visualization of commits linked via these parent pointers in the git version graph 
of a series of (open or recently closed) changes which are in one line of descent.
 
Can anyone point me to the documentation for this?
 

Regards,
Brad


--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/23bb0f99-45c4-4294-85e7-dbc20b97dd5an%40googlegroups.com.

Björn Pedersen

unread,
Apr 10, 2024, 2:40:46 AM4/10/24
to Repo and Gerrit Discussion
Matthias Sohn schrieb am Montag, 8. April 2024 um 22:00:16 UTC+2:
On Mon, Apr 8, 2024 at 9:47 PM Brad Triebwasser <btr...@chromium.org> wrote:
I see mentions of "relation chain" in the gerrit documentation (e.g. here),  but I can't find any documentation on how to actually create a relation chain, or set a parent change for a given change. This discussion talks about ancestor changes, but I'm not able to find and gerrit documentation on how to create an ancestor chain.

Every git commit has a pointer to its parent commit (except one or few commits at the roots of the version graph).
The relation chain is a visualization of commits linked via these parent pointers in the git version graph 
of a series of (open or recently closed) changes which are in one line of descent.
 
Can anyone point me to the documentation for this?
 


And  in less technical words:  If you push  a whole local dev branch to gerrit, then you get a nice relation chain.

 x -- y --master-head
        \_   A -- B -- C--dev-head

git push gerrit dev-head:refs/for/master 

 give  Y -A -B -C as relation chain.

Daniele Sassoli

unread,
Apr 15, 2024, 8:14:14 AM4/15/24
to Repo and Gerrit Discussion
On Wednesday 10 April 2024 at 07:40:46 UTC+1 Björn Pedersen wrote:
Matthias Sohn schrieb am Montag, 8. April 2024 um 22:00:16 UTC+2:
On Mon, Apr 8, 2024 at 9:47 PM Brad Triebwasser <btr...@chromium.org> wrote:
I see mentions of "relation chain" in the gerrit documentation (e.g. here),  but I can't find any documentation on how to actually create a relation chain, or set a parent change for a given change. This discussion talks about ancestor changes, but I'm not able to find and gerrit documentation on how to create an ancestor chain.

Every git commit has a pointer to its parent commit (except one or few commits at the roots of the version graph).
The relation chain is a visualization of commits linked via these parent pointers in the git version graph 
of a series of (open or recently closed) changes which are in one line of descent.
 
Can anyone point me to the documentation for this?
 


And  in less technical words:  If you push  a whole local dev branch to gerrit, then you get a nice relation chain.
 
Just to be even clearer, it doesn't need to be a separate branch. You can commit to your local master branch and push it for review against master itself with "git push origin HEAD:refs/for/master"
The outcome will be the same as described below.
 
Reply all
Reply to author
Forward
0 new messages