]> source.dussan.org Git - gitea.git/commit
Add push to remote mirror repository (#15157)
authorKN4CK3R <admin@oldschoolhack.me>
Mon, 14 Jun 2021 17:20:43 +0000 (19:20 +0200)
committerGitHub <noreply@github.com>
Mon, 14 Jun 2021 17:20:43 +0000 (19:20 +0200)
commit440039c0cce18622b12da5677bf6585caed6070a
tree8f8532a2d40983b35b3fdb5460b47218b26bbd89
parent5d113bdd1905c73fb8071f420ae2d248202971f9
Add push to remote mirror repository (#15157)

* Added push mirror model.

* Integrated push mirror into queue.

* Moved methods into own file.

* Added basic implementation.

* Mirror wiki too.

* Removed duplicated method.

* Get url for different remotes.

* Added migration.

* Unified remote url access.

* Add/Remove push mirror remotes.

* Prevent hangs with missing credentials.

* Moved code between files.

* Changed sanitizer interface.

* Added push mirror backend methods.

* Only update the mirror remote.

* Limit refs on push.

* Added UI part.

* Added missing table.

* Delete mirror if repository gets removed.

* Changed signature. Handle object errors.

* Added upload method.

* Added "upload" unit tests.

* Added transfer adapter unit tests.

* Send correct headers.

* Added pushing of LFS objects.

* Added more logging.

* Simpler body handling.

* Process files in batches to reduce HTTP calls.

* Added created timestamp.

* Fixed invalid column name.

* Changed name to prevent xorm auto setting.

* Remove table header im empty.

* Strip exit code from error message.

* Added docs page about mirroring.

* Fixed date.

* Fixed merge errors.

* Moved test to integrations.

* Added push mirror test.

* Added test.
40 files changed:
docs/content/doc/advanced/repo-mirror.en-us.md [new file with mode: 0644]
integrations/mirror_pull_test.go [new file with mode: 0644]
integrations/mirror_push_test.go [new file with mode: 0644]
models/migrations/migrations.go
models/migrations/v180.go
models/migrations/v183.go [new file with mode: 0644]
models/models.go
models/repo.go
models/repo_mirror.go
models/repo_pushmirror.go [new file with mode: 0644]
models/repo_pushmirror_test.go [new file with mode: 0644]
models/task.go
modules/context/repo.go
modules/git/remote.go [new file with mode: 0644]
modules/git/repo.go
modules/lfs/client.go
modules/lfs/client_test.go
modules/lfs/filesystem_client.go
modules/lfs/http_client.go
modules/lfs/http_client_test.go
modules/lfs/shared.go
modules/lfs/transferadapter.go
modules/lfs/transferadapter_test.go
modules/repository/repo.go
modules/task/migrate.go
modules/task/task.go
modules/templates/helper.go
modules/util/sanitize.go
modules/util/sanitize_test.go
options/locale/locale_en-US.ini
routers/api/v1/repo/migrate.go
routers/web/repo/migrate.go
routers/web/repo/setting.go
services/forms/repo_form.go
services/mirror/mirror.go
services/mirror/mirror_pull.go [new file with mode: 0644]
services/mirror/mirror_push.go [new file with mode: 0644]
services/mirror/mirror_test.go [deleted file]
templates/repo/header.tmpl
templates/repo/settings/options.tmpl