Page MenuHomeSoftware Heritage

Add optional context parameters for the browsing revision view
Closed, MigratedEdits Locked

Description

Using the url https://archive.softwareheritage.org/browse/revision/<swh-id>?origin={<url>,<type>}, we can add context to the revision.

A revision by itself on the web-app does not have context.
As a result, we cannot know if the revision was created from a deposit or the deposit's origin.

With those optional parameters, we can search rapidly the revision context and show it together with the revision metadata and target directory.

So, in the end, when the HAL user clicks on the swh-id in the HAL webpage, that will open that revision page with the given context.

Event Timeline

ardumont renamed this task from Add optional context parameters for revision view (aka injected deposits) to Add optional context parameters for the browsing revision view.Dec 8 2017, 11:22 AM
ardumont triaged this task as Normal priority.
ardumont updated the task description. (Show Details)
ardumont added projects: Web app, SWORD deposit.

Working on it.

In order to match the browse URI scheme currently implemented, the revision view in a context of an origin will have one of the the following URLs:

  • /browse/origin/(origin_id)/revision/(revision_id)/
  • /browse/origin/(origin_type)/url/(origin_url)/revision/(revision_id)/
anlambert changed the task status from Open to Work in Progress.Dec 8 2017, 11:33 AM
anlambert claimed this task.

Thinking back on the URI scheme, using query parameters seems the right way after all.

The main reason is that currently, it is too costly to verify that a revision is tied to an origin
as it implies to get the whole revision history and check that it contains the revision id of interest.

So URLs will be:

  • /browse/revision/(revision_id)/?origin_id=(origin_id)
  • /browse/revision/(revision_id)/?origin_type=(origin_type)&origin_url=(origin_url)