... | ... | @@ -410,30 +410,24 @@ below) but just archived, use the following procedure. |
|
|
|
|
|
exit 1
|
|
|
|
|
|
2. Make sure the hook is executable:
|
|
|
|
|
|
chmod +x hooks/pre-receive
|
|
|
|
|
|
4. in Gitolite, make the project part of the "Attic", for example
|
|
|
|
|
|
@@ -328,13 +328,13 @@ admin/trac/TracAccountManager "The Tor Project" = "Tor specific changes to Matth
|
|
|
|
|
|
repo project/help/infra
|
|
|
RW+ = @torproject-admin
|
|
|
- config gitweb.category = Infrastructure and Administration
|
|
|
-project/help/infra "The Tor Project" = "help.torproject.org infrastructure"
|
|
|
+ config gitweb.category = Attic
|
|
|
+project/help/infra "The Tor Project" = "help.torproject.org infrastructure (archived to GitLab: https://gitlab.torproject.org/tpo/tpa/wiki-infra-archive')"
|
|
|
|
|
|
repo project/help/wiki
|
|
|
repo project/foo
|
|
|
RW = anarcat
|
|
|
- config gitweb.category = Infrastructure and Administration
|
|
|
-project/help/wiki "The Tor Project" = "help.torproject.org content"
|
|
|
- config gitweb.category = Old category
|
|
|
-project/foo "The Tor Project" = "foo project"
|
|
|
+ config gitweb.category = Attic
|
|
|
+project/help/wiki "The Tor Project" = "help.torproject.org content (archived to GitLab: https://gitlab.torproject.org/tpo/tpa/wiki-archive')"
|
|
|
+project/foo "The Tor Project" = "foo project (deprecated)"
|
|
|
|
|
|
repo project/jenkins/jobs
|
|
|
repo project/bar
|
|
|
RW = @jenkins-admins
|
|
|
|
|
|
The only downside with that approach is that a git clone will not warn
|
|
|
about the project redirection, but I am not sure there's a way to fix
|
|
|
that.
|
|
|
The `description` file in the repository should also be updated
|
|
|
similarly.
|
|
|
|
|
|
## GitHub and GitLab Mirrors implementation details
|
|
|
|
... | ... | @@ -486,55 +480,6 @@ pushes to Gitlab. |
|
|
|
|
|
See also [bug 41](https://gitlab.torproject.org/tpo/tpa/gitlab/-/issues/41#note_2685994) for a larger discussion on this solution.
|
|
|
|
|
|
## Archiving a repository
|
|
|
|
|
|
To archive a repository, it must first be deactivated by adding a
|
|
|
`pre-receive` hook, e.g. in:
|
|
|
|
|
|
/srv/git.torproject.org/repositories/PROJECT.git/hooks/pre-receive
|
|
|
|
|
|
The script should display some sort of warning and exit with an error,
|
|
|
for example:
|
|
|
|
|
|
```
|
|
|
#!/bin/sh
|
|
|
|
|
|
cat <<EOF
|
|
|
This repository is deprecated and should not be used anymore.
|
|
|
|
|
|
See this issue for details:
|
|
|
|
|
|
https://gitlab.torproject.org/tpo/tpa/team/-/issues/9999999
|
|
|
EOF
|
|
|
|
|
|
exit 1
|
|
|
```
|
|
|
|
|
|
Make sure the hook is executable:
|
|
|
|
|
|
chmod +x hooks/pre-receive
|
|
|
|
|
|
Then in Gitolite, the repository must be put "in the Attic", using a
|
|
|
patch that looks something like this:
|
|
|
|
|
|
```
|
|
|
repo project/foo
|
|
|
RW = anarcat
|
|
|
- config gitweb.category = Old category
|
|
|
-project/foo "The Tor Project" = "foo project"
|
|
|
+ config gitweb.category = Attic
|
|
|
+project/foo "The Tor Project" = "foo project (deprecated)"
|
|
|
|
|
|
repo project/bar
|
|
|
RW = @jenkins-admins
|
|
|
```
|
|
|
|
|
|
The `description` file in the repository should also be updated
|
|
|
similarly.
|
|
|
|
|
|
Note that repos can also be migrated (and archived) to GitLab, see
|
|
|
[the GitLab migration procedure](howto/gitlab/#how-to-migrate-a-git-repository-from-legacy-to-gitlab) for details.
|
|
|
|
|
|
## Pager playbook
|
|
|
|
|
|
### gitweb out of sync
|
... | ... | |