... | ... | @@ -339,11 +339,51 @@ that. |
|
|
|
|
|
See [issue 36][] for further discussion.
|
|
|
|
|
|
### Mirroring a gitolite repository to GitLab
|
|
|
|
|
|
Important: this policy is still being debated. It is not clear if any
|
|
|
or all repositories should be mirror or just migrated to GitLab, see
|
|
|
[issue 36][] for the discussion on this topic.
|
|
|
|
|
|
Also consider [migrating the repository to GitLab permanently](#how-to-migrate-a-git-repository-from-legacy-to-gitlab).
|
|
|
|
|
|
1. import the Gitolite repository in GitLab:
|
|
|
|
|
|
* [create a new project](https://gitlab.torproject.org/projects/new)
|
|
|
* pick the "Import project" button
|
|
|
* pick the "Repo by URL" button
|
|
|
* copy-paste the `https://git.torproject.org/...` Git Repository
|
|
|
URL
|
|
|
* pick a project name and namespace (should ideally match the
|
|
|
original project as close as possible)
|
|
|
* add a description (again, matching the original from
|
|
|
gitweb/gitolite)
|
|
|
* pick the "Create project" button
|
|
|
|
|
|
This will import the git repository into a new GitLab project.
|
|
|
|
|
|
2. in Gitolite, add the GitLab project URL to enable the mirror hook,
|
|
|
for example:
|
|
|
|
|
|
modified conf/gitolite.conf
|
|
|
@@ -1502,6 +1502,7 @@ repo translation
|
|
|
RW+ = emmapeel
|
|
|
config hooks.irc-enabled = true
|
|
|
config hooks.ircproject = or
|
|
|
+ config hooks.gitlaburl = tpo/web/translation
|
|
|
translation "The Tor Project" = "Translations, one branch per project"
|
|
|
|
|
|
repo translation-tools
|
|
|
|
|
|
In that example, the `translation.git` repository will push to the
|
|
|
`tpo/web/translation` mirror.
|
|
|
|
|
|
### GitHub and GitLab Mirrors implementation details
|
|
|
|
|
|
Some repositories are mirrored to https://github.com/torproject
|
|
|
organization and to the https://gitlab.torproject.org/ server, through
|
|
|
gitolite hooks.
|
|
|
gitolite hooks. See above on how to [migrate](#how-to-migrate-a-git-repository-from-legacy-to-gitlab) and [mirror](#how-to-migrate-a-git-repository-from-legacy-to-gitlab) such
|
|
|
repositories to GitLab.
|
|
|
|
|
|
This used to be through a `git push --mirror $REMOTE` command, but now
|
|
|
we do a `git push --force $REMOTE '+refs/*:refs/*'`, because the
|
... | ... | |