dat-ecosystem-archive / datproject-discussions

a repo for discussions and other non-code organizing stuff [ DEPRECATED - More info on active projects and modules at https://dat-ecosystem.org/ ]
65 stars 6 forks source link

Dat clone specific revision/version #85

Closed ilyaigpetrov closed 6 years ago

ilyaigpetrov commented 6 years ago
  1. If you were about to implement cloning specific version what would be your steps (so some dev may follow them)?
  2. How versioned dat-link should look like? E.g. dat://ff93418b1759242276eca588ebdff2b90da14d3ad9d444dbc9cc0b5bbbd5fafc?version=xx may be not a good idea if you consider dat://ff93418b1759242276eca588ebdff2b90da14d3ad9d444dbc9cc0b5bbbd5fafc/index.html?version=xx where version query parameter is used inside index.html (index.html may be interpreted as a html page in some browser or over some http gateway).
RangerMauve commented 6 years ago

Hi, I couldn't find the docs for it anywhere, but a versioned dat URL looks like:

dat://KEY_HERE+VERSION_HERE/file.html

That is, the version is optionally specified by having a + after the key and the version name before the path.

You can see it being used in modules that parse dat URLs

ilyaigpetrov commented 6 years ago

Thanks. Interesting that version may not only be numeric, but also a string like latest or weird c1 (according to test.js).

RangerMauve commented 6 years ago

Yeah, I haven't seen too much in relation to how versioning works. :/