Gerrit replication to different repo/projects names

142 views
Skip to first unread message

Florent Delord

unread,
Mar 10, 2017, 9:23:55 AM3/10/17
to Repo and Gerrit Discussion

Under Gerrit, my project is named project1. I would like to replicate it to the server2 where path is /GitRepo/project2.


Is it possible to replicate project1 to another server where the project is named project2 (different from Gerrit name) ?


The configuration file bellow will replicate to /GitRepo/project2 and not /GitRepo/project1

[remote "server2"]
        url = git@server2:/GitRepo/${name}
        push = +refs/heads/*:refs/heads/*
        push = +refs/tags/*:refs/tags/*
        projects = project1



I need this because I am replicating all my git repo under following tree but they are all in same Gerrit instance.

They are not submodules but independant repository.


/GitRepo/
        |
         -- PROJ1
            |
             -- A
             -- B
        |
         -- PROJ2
             -- A  (but different from PROJ1/A)
             -- C

Björn Pedersen

unread,
Mar 10, 2017, 10:15:54 AM3/10/17
to Repo and Gerrit Discussion
Hi

For single projects it will work if you omit the ${name} from the url and replace it with the new name.
See https://gerrit.googlesource.com/plugins/replication/+doc/master/src/main/resources/Documentation/config.md#File-1
for details.

Björn

Florent Delord

unread,
Mar 13, 2017, 10:29:11 AM3/13/17
to Repo and Gerrit Discussion
Hi,

Thanks a lot, I missed this "Optional" ${NAME} variable.
It works for me.

Regards.
Reply all
Reply to author
Forward
0 new messages