go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.83k stars 5.47k forks source link

Enable mirroring mercurial codebases, by using `git-cinnabar` on clone and pull. #19866

Open c4lliope opened 2 years ago

c4lliope commented 2 years ago

Feature Description

See git-cinnabar add-in command, (or my mirror).

I use such a scheme manually, so I can mirror mozilla's source code.

Screenshots

No response

c4lliope commented 2 years ago

Here are rough commands I used during my clone:

alias g="git"
g clone git@base.assembled.app:dependencies/git-cinnabar

cd git-cinnabar/;
export PATH="$PATH:${PWD}"
make
cd ..

g cinnabar download # perhaps unnecessary, since you ran `make` earlier.
g cinnabar help
g clone hg://hg.mozilla.org/mozilla-central mozilla
c4lliope commented 2 years ago

Seems like this could go someplace around here: https://github.com/go-gitea/gitea/blob/main/services/mirror/mirror_pull.go#L41

istiak101 commented 2 years ago

+1 from me. I need to track https://hg.nginx.org/nginx-quic but this is mercurial unfortunately.

c4lliope commented 1 year ago

Hello! I'm migrating my Gitea and am realizing that the Mozilla repo I cloned ages ago hasn't been able to keep up as a mirror, because I used a one-off git-cinnabar command instead of setting up real mirroring.

Can someone recommend an approach for combining git-cinnabar into the mirroring process?