Bundle and unbundle command for mercurial (#1511)

Support for exporting and importing mercurial repositories as tar ball

Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
This commit is contained in:
Eduard Heimbuch
2021-01-28 13:09:47 +01:00
committed by GitHub
parent bd3671b428
commit c3ab6bc5d5
19 changed files with 435 additions and 28 deletions

View File

@@ -158,15 +158,15 @@ public class RepositoryExportResource {
)
)
public Response exportFullRepository(@Context UriInfo uriInfo,
@PathParam("namespace") String namespace,
@PathParam("name") String name,
@Pattern(regexp = "\\w{1,10}") @PathParam("type") String type
@PathParam("namespace") String namespace,
@PathParam("name") String name,
@Pattern(regexp = "\\w{1,10}") @PathParam("type") String type
) {
Repository repository = getVerifiedRepository(namespace, name, type);
StreamingOutput output = os -> fullScmRepositoryExporter.export(repository, os);
return Response
.ok(output, "application/x-gzip")
.ok(output, "application/x-gzip")
.header("content-disposition", createContentDispositionHeaderValue(repository, "tar.gz"))
.build();
}