Pull-replication from a non-gerrit server

93 views
Skip to first unread message

Kenny Ho

unread,
Jun 17, 2024, 4:56:45 PMJun 17
to Repo and Gerrit Discussion
Does pull-replication plugin work with non-Gerrit remote?  Reading the documentation, it is not clear to me where the plugin will place mirrored repos.  I thought may be the name in remote.NAME specify the local repo path but then the docs say "NAME portion is unused by this plugin".  Or does the plugin reads pull-replication.config in refs/meta/config in the local project?

Thanks.

Luca Milanesio

unread,
Jun 17, 2024, 5:23:29 PMJun 17
to Repo and Gerrit Discussion, Luca Milanesio


> On 17 Jun 2024, at 21:56, Kenny Ho <y2k...@gmail.com> wrote:
>
> Does pull-replication plugin work with non-Gerrit remote?

Yes, that was the main reason why I created the plugin years ago :-)

> Reading the documentation, it is not clear to me where the plugin will place mirrored repos. I thought may be the name in remote.NAME specify the local repo path but then the docs say "NAME portion is unused by this plugin".

I believe you misread the documentation: “name” refers to the name of the subsection, not the {name} expansion in the URL.

> Or does the plugin reads pull-replication.config in refs/meta/config in the local project?

pull-replication.config in refs/meta/config? Where did the documentation mention it?
I am the author of the plugin and not recall putting any configs in refs/meta/config of the project.

Luca.

Kenny Ho

unread,
Jun 17, 2024, 5:58:49 PMJun 17
to Repo and Gerrit Discussion
ok... so I must be missing some part of the documentation. 

If I have a "remote-host.xyz/org/projectA.git" and want to put it into local gerrit project named "mirror/upstream/project-a", how should I make the configuration?  I guess I am confused about where ${name} gets its value if it's not NAME (that's why I speculated about refs/meta/config but I guess that's not correct.)

Kenny

Luca Milanesio

unread,
Jun 17, 2024, 7:35:27 PMJun 17
to Repo and Gerrit Discussion, Luca Milanesio


> On 17 Jun 2024, at 22:58, Kenny Ho <y2k...@gmail.com> wrote:
>
> ok... so I must be missing some part of the documentation.
>
> If I have a "remote-host.xyz/org/projectA.git" and want to put it into local gerrit project named "mirror/upstream/project-a", how should I make the configuration? I guess I am confused about where ${name} gets its value if it's not NAME (that's why I speculated about refs/meta/config but I guess that's not correct.)

{name} is the local project name that you can use for associating to the remote repository.

If your local project name is 'mirror/upstream/project-a’ and the remote project name 'org/projectA.git’ then I don’t see much in common.
In that case, you can’t use the {name} in the URL I believe.

Luca.

Kenny Ho

unread,
Jun 18, 2024, 12:59:52 AMJun 18
to Repo and Gerrit Discussion
ok, so if I specify remote.NAME.url to "remote-host.xyz/org/projectA.git", where would I specify "mirror/upstream/project-a"?

Kenny

Kenny Ho

unread,
Jun 24, 2024, 10:38:18 AM (9 days ago) Jun 24
to Repo and Gerrit Discussion
Hi Luca,

I think I am missing something really obvious.  If I want to mirror https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ into gerrit with pull-replication plugin, what would the config look like?  (or is pull-replication the wrong tool to use?)

Kenny

Luca Milanesio

unread,
Jun 24, 2024, 11:34:01 AM (9 days ago) Jun 24
to Repo and Gerrit Discussion, Luca Milanesio

On 24 Jun 2024, at 15:38, Kenny Ho <y2k...@gmail.com> wrote:

Hi Luca,

I think I am missing something really obvious.  If I want to mirror https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ into gerrit with pull-replication plugin, what would the config look like?  (or is pull-replication the wrong tool to use?)

See a sample configuration at [1]

In your example, it would be:

[remote “linux”]
  projects = linux

The above would replicate https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git into the local repository linux.git

HTH

Luca.



Kenny

On Tuesday, June 18, 2024 at 12:59:52 AM UTC-4 Kenny Ho wrote:
ok, so if I specify remote.NAME.url to "remote-host.xyz/org/projectA.git", where would I specify "mirror/upstream/project-a"?

Kenny
On Monday, June 17, 2024 at 7:35:27 PM UTC-4 Luca Milanesio wrote:


> On 17 Jun 2024, at 22:58, Kenny Ho <y2k...@gmail.com> wrote:
>
> ok... so I must be missing some part of the documentation.
>
> If I have a "remote-host.xyz/org/projectA.git" and want to put it into local gerrit project named "mirror/upstream/project-a", how should I make the configuration? I guess I am confused about where ${name} gets its value if it's not NAME (that's why I speculated about refs/meta/config but I guess that's not correct.)

{name} is the local project name that you can use for associating to the remote repository.

If your local project name is 'mirror/upstream/project-a’ and the remote project name 'org/projectA.git’ then I don’t see much in common.
In that case, you can’t use the {name} in the URL I believe.

Luca.

--
--
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/cf859445-9739-4b19-ba99-62f409369ebbn%40googlegroups.com.

Kenny Ho

unread,
Jun 24, 2024, 12:19:24 PM (9 days ago) Jun 24
to Repo and Gerrit Discussion
Ahhh!  the remote.NAME.projects is the obvious thing that I missed.  The documentation say "specifies which repositories should be replicated from the remote" and that threw me off.  Thanks for the help!
Reply all
Reply to author
Forward
0 new messages