We need to support the svn:externals property, which is similar in spirit to Git submodules. See upstream doc.
It looks like that doing so will require extending our data model for directory entries pointing to revision.
Our directory_entry_rev entries are currently able to point only to specific revisions (by their checksum ID), that can be found in the archive.
svn:externals OTOH allows to point to either specific revisions (identified by SVN revision ID...) or to repository URLs. In the latter case the semantics is, checkout the most recent revision at the time of the checkout of the parent repository.
Various problems need to be tackled:
- How to store the information in our directories. To that end we can either 1) add a new type of directory entry (repo_entries?), or 2) modify directory_entry_rev to point to either a specific rev or a repo.
- How to point to an external repo, as that is a moving target. In our current model the most natural thing will probably be to point to an origin, but we need to take care of the caveat that we might encounter repositories pointing to URLs that we haven't yet added as origins.
- In case a specific revision is specified, when to lookup its checksum ID, as that might change over time. Here again, "never" is a legitimate answer to consider, even though that would make implementing repository checkouts (e.g., for the vault) more complex.
- Finally, how to avoid losing svn-specific information, in particular I think we want to keep both the URL and the optional revision in their native form (URL, revision number) even if/when we decide to resolve them to internal SWH identifiers. This might mean adding some (possibly JSON) metadata field to the relevant directory entries table.
Discuss ☺