Well, it’s working. Piston 2.0 (aka 1.9.0 in Piston’s GitHub repository) can import from a Subversion repository, into a Subversion working copy. And it’s mostly saving the same information as it was previously, in the same way.
But, I received a suggestion/comment from Faisal:
so i’m wondering if it wouldn’t make sense to have the per-vcs metadata formats replaced with something like config/piston.yml, read by piston. the main advantage to doing so would be easier conversion between format types, especially in cases where one type is checking out from another (e.g. svk or git-svn against an svn back-end).
Faisal N Jawdat in a private E-Mail conversation
Actually, this is not a bad idea. Using this method, a Subversion project, imported in a Git repository, would still be able to use Piston to update the vendor branch. The more the information is accessible, the better it will be.
This means Piston needs to provide an upgrade path. I shall do like Subversion, which silently upgrades the working copy when necessary. And to be on the safe side, I shall also include a format in the piston metadata to enable future upgrades with easier handling.
Recapping, Pistonized directories will now have a new, hidden, file:
1 $ ls -A1 vendor/rails 2 .piston-metadata.yml 3 activerecord/ 4 ...
.piston-metadata.yml file would contain something like this:
1 $ cat vendor/rails/.piston-metadata.yml 2 # What data can Piston expect from this file ? 3 format: 1 4 5 # Which repository handler must we use ? 6 repository: svn 7 8 # Properties that the handler wanted us to save 9 handler-metadata: 10 # Same as piston:remote-revision 11 remote-revision: 9025 12 # Same as piston:root 13 svn-root: http://dev.rubyonrails.org/svn/rails/trunk 14 # Same as piston:uuid 15 svn-uuid: 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
If you were aware of how Piston was storing properties, you might not that the piston:local-revision property is gone. Instead of hard-coding which revision we need to import, I’ll instead use the last changed date/time. It’s less precise, but makes interoperability with different repository handlers much easier. No need to map between revision 8920 of Subversion to Git commits.
That looks promising, no ?
Next step ? Implementing the Git backend. After that, it’s testing Svn+Git, Git+Svn, Git+Git and Svn+Svn. Hurray!