I would like to source-manage a set of files that are built as zip files, containing XML files.
Since currently those files are checked in as is, they are treated as binary files with all obvious limitations
Since those files contain XML files, to avoid asking programmers to zip / unzip, I would like to do the following, automatically
For check-ins: automatically explode the files:
- These files have a unique extention, so for each file checked in with that extension
- unzip that file to memory / temp location
- For each of those files (XML) normalize them (for comparing / merging)
- Reorder the root's direct child nodes in a predefined order (e.g. alphabetical)
- Some items have local reference IDs, rewrite the IDs sequentialy after the sort
- create a folder in SVN with the same name as the original zipped file
- check in the files in the zip into that folder
For check-outs: automatically repackage the files:
- Less important - can be done using Maven / Ant
- When checking out the exploded folder (or any of it's content files)
- Instead of checking out that folder / files:
- Zip all the files on that folder
- And check out the zipped file
For Merges
I assume the merge is not SVN server side, and is the client's responsibility, so is there an easy way to write a merge plugin instead, (e.g. for Tortoise)
Is the any of the above possible? if so then how? is there more than one way?