diff --git a/assets/src/bundles/vault/vault-create-tasks.js b/assets/src/bundles/vault/vault-create-tasks.js
--- a/assets/src/bundles/vault/vault-create-tasks.js
+++ b/assets/src/bundles/vault/vault-create-tasks.js
@@ -19,7 +19,7 @@
if (objectType === 'directory') {
vaultUrl = Urls.api_1_vault_cook_flat(swhid);
} else {
- vaultUrl = Urls.api_1_vault_cook_gitfast(swhid);
+ vaultUrl = Urls.api_1_vault_cook_git_bare(swhid);
}
// check if object has already been cooked
const response = await fetch(vaultUrl);
@@ -68,7 +68,7 @@
if (cookingTask.bundle_type === 'flat') {
cookingUrl = Urls.api_1_vault_cook_flat(cookingTask.swhid);
} else {
- cookingUrl = Urls.api_1_vault_cook_gitfast(cookingTask.swhid);
+ cookingUrl = Urls.api_1_vault_cook_git_bare(cookingTask.swhid);
}
if (cookingTask.email) {
cookingUrl += '?email=' + cookingTask.email;
@@ -135,7 +135,7 @@
const email = $('#swh-vault-revision-email').val().trim();
if (!email || validateEmail(email)) {
const cookingTask = {
- 'bundle_type': 'gitfast',
+ 'bundle_type': 'git_bare',
'swhid': revisionId,
'email': email,
'status': 'new'
@@ -148,7 +148,7 @@
export async function fetchRevisionArchive(revisionSwhid) {
$('#vault-fetch-directory-modal').modal('hide');
- const vaultUrl = Urls.api_1_vault_cook_gitfast(revisionSwhid);
+ const vaultUrl = Urls.api_1_vault_cook_git_bare(revisionSwhid);
const response = await fetch(vaultUrl);
const data = await response.json();
swh.vault.fetchCookedObject(data.fetch_url);
diff --git a/assets/src/bundles/vault/vault-table-row.ejs b/assets/src/bundles/vault/vault-table-row.ejs
--- a/assets/src/bundles/vault/vault-table-row.ejs
+++ b/assets/src/bundles/vault/vault-table-row.ejs
@@ -12,10 +12,11 @@
$ tar xvzf <%= cookingTask.swhid %>.tar.gz">
<% } else { %>
.gitfast.gz | git fast-import">
+$ tar xvf <%= cookingTask.swhid %>.git.tar
+$ git clone <%= cookingTask.swhid %>.git new_repository
+$ cd new_repository/">
<% } %>
diff --git a/assets/src/bundles/vault/vault-ui.js b/assets/src/bundles/vault/vault-ui.js
--- a/assets/src/bundles/vault/vault-ui.js
+++ b/assets/src/bundles/vault/vault-ui.js
@@ -75,7 +75,7 @@
if (recookTask.bundle_type === 'flat') {
cookingUrl = Urls.api_1_vault_cook_flat(recookTask.swhid);
} else {
- cookingUrl = Urls.api_1_vault_cook_gitfast(recookTask.swhid);
+ cookingUrl = Urls.api_1_vault_cook_git_bare(recookTask.swhid);
}
if (recookTask.email) {
cookingUrl += '?email=' + recookTask.email;
@@ -130,8 +130,8 @@
cookingTask.fetch_url = Urls.api_1_vault_fetch_flat(cookingTask.swhid);
} else if (cookingTask.object_type === 'revision') {
cookingTask.swhid = `swh:1:rev:${cookingTask.object_id}`;
- cookingTask.bundle_type = 'gitfast';
- cookingTask.fetch_url = Urls.api_1_vault_fetch_gitfast(cookingTask.swhid);
+ cookingTask.bundle_type = 'git_bare';
+ cookingTask.fetch_url = Urls.api_1_vault_fetch_git_bare(cookingTask.swhid);
} else {
// Log to the console + Sentry
console.error(`Unexpected cookingTask.object_type: ${cookingTask.object_type}`);
@@ -148,7 +148,7 @@
if (cookingTask.bundle_type === 'flat') {
cookingUrl = Urls.api_1_vault_cook_flat(cookingTask.swhid);
} else {
- cookingUrl = Urls.api_1_vault_cook_gitfast(cookingTask.swhid);
+ cookingUrl = Urls.api_1_vault_cook_git_bare(cookingTask.swhid);
}
if (cookingTask.status !== 'done' && cookingTask.status !== 'failed') {
cookingTaskRequests.push(fetch(cookingUrl));
diff --git a/cypress/fixtures/swh:1:rev:1c480a4573d2a003fc2630c21c2b25829de49972.git.tar b/cypress/fixtures/swh:1:rev:1c480a4573d2a003fc2630c21c2b25829de49972.git.tar
new file mode 100644
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@ {
- return genVaultCookingResponse('gitfast', this.revision, status,
+ return genVaultCookingResponse('git_bare', this.revision, status,
message, this.vaultFetchRevisionUrl);
};
@@ -285,9 +285,9 @@
// Stub response to the vault API indicating to simulate archive download
cy.intercept({url: this.vaultFetchRevisionUrl}, {
- fixture: `${this.revision}.gitfast.gz`,
+ fixture: `${this.revision}.git.tar`,
headers: {
- 'Content-disposition': `attachment; filename=${this.revision}.gitfast.gz`,
+ 'Content-disposition': `attachment; filename=${this.revision}.git.tar`,
'Content-Type': 'application/gzip'
}
}).as('fetchCookedArchive');
@@ -488,16 +488,16 @@
});
- it('should offer to immediately download a revision gitfast archive if already cooked', function() {
+ it('should offer to immediately download a bare revision git archive if already cooked', function() {
cy.adminLogin();
// Browse a directory
cy.visit(this.revisionUrl);
// Stub response to the vault API to simulate archive download
cy.intercept({url: this.vaultFetchRevisionUrl}, {
- fixture: `${this.revision}.gitfast.gz`,
+ fixture: `${this.revision}.git.tar`,
headers: {
- 'Content-disposition': `attachment; filename=${this.revision}.gitfast.gz`,
+ 'Content-disposition': `attachment; filename=${this.revision}.git.tar`,
'Content-Type': 'application/gzip'
}
}).as('fetchCookedArchive');
diff --git a/swh/web/api/views/vault.py b/swh/web/api/views/vault.py
--- a/swh/web/api/views/vault.py
+++ b/swh/web/api/views/vault.py
@@ -404,7 +404,7 @@
Then to import the revision in the current directory, use::
- $ tar -xzf path/to/swh:1:rev:*.git_bare.tar.gz
+ $ tar -xf path/to/swh:1:rev:*.git.tar
$ git clone swh:1:rev:*.git new_repository
(replace ``swh:1:rev:*`` with the SWHID of the requested revision)
@@ -484,7 +484,7 @@
notfound_msg="Cooked archive for {} not found.".format(swhid),
request=request,
)
- fname = "{}.git_bare.tar.gz".format(swhid)
+ fname = "{}.git.tar".format(swhid)
response = HttpResponse(res, content_type="application/gzip")
response["Content-disposition"] = "attachment; filename={}".format(fname)
return response
diff --git a/swh/web/templates/includes/vault-create-tasks.html b/swh/web/templates/includes/vault-create-tasks.html
--- a/swh/web/templates/includes/vault-create-tasks.html
+++ b/swh/web/templates/includes/vault-create-tasks.html
@@ -107,7 +107,7 @@
You have requested the cooking of the history heading to revision with identifier {{ vault_cooking.revision_swhid }}
- into a git fast-import archive .
+ into a bare git archive .
Are you sure you want to continue ?
@@ -139,7 +139,7 @@
You have requested the download of the history heading to revision with identifier {{ vault_cooking.revision_swhid }}
- as a git fast-import archive .
+ as a bare git archive .
Are you sure you want to continue ?
|