You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One way to explore the history of a particular file:
Loop through hyperdrive version numbers, starting with the current version and going backwards. Check if drive.diff(...) returns non-null (we could use a HEAD request for this?). If so, checkout that version and display the file at that version or inform the user that the file didn't exist before that version.
What about the edge-case where a file was created, deleted, then created again? Can we just continue checking back in time until we get a non-null diff or we get to the beginning of the history?
Do you know of a better approach? I imagine that sending a new HTTP request to hyper-gateway on each loop could be slow.
The text was updated successfully, but these errors were encountered:
To accomplish this, we could extrapolate on the ideas discussed here and here.
If the latest version of the drive is version 100 and user wants to checkout the version of /example.txt before the last change, send a GET request to hyper://public-key/$/previous/100/example.txt. Assuming that the most recent different version of /example.txt is version 42, this would have the same effect as GEThyper://public-key/$/version/42/example.txt. A HEAD request should return just the headers, allowing for a quick overview of the version history of particular file, including file sizes, modification dates, and version numbers.
Going forward through version history, GEThyper://public-key/$/previous/42/example.txt should give version 43. GEThyper://public-key/$/previous/42/example.txt should give version 100 (current).
One way to explore the history of a particular file:
Loop through hyperdrive version numbers, starting with the current version and going backwards. Check if
drive.diff(...)
returns non-null (we could use aHEAD
request for this?). If so, checkout that version and display the file at that version or inform the user that the file didn't exist before that version.What about the edge-case where a file was created, deleted, then created again? Can we just continue checking back in time until we get a non-null diff or we get to the beginning of the history?
Do you know of a better approach? I imagine that sending a new HTTP request to hyper-gateway on each loop could be slow.
The text was updated successfully, but these errors were encountered: