开发者

File formats with included versioning

开发者 https://www.devze.com 2023-02-06 19:33 出处:网络
I like the idea of using compressed folders as containers for file formats. They are used for LibreOffice or Dia. So if I want to define a special purpose file format, I can define a folder and file s

I like the idea of using compressed folders as containers for file formats. They are used for LibreOffice or Dia. So if I want to define a special purpose file format, I can define a folder and file structure and just zip the root folder and have a single file with all the data in a single file. Imported files just live as originals inside the compressed file. Defining a binary file format from zero with this features would be a lot of work.

Now to my question: Are there applications which are using compressed folders as file formats and do versioning inside the folder? The benefits would be great. You could just commit a state in your project into your file and the versioning is just decorated with functions from your own application. Also diffs could be presented your own way.

Libraries for working with compressed files and for versioning are available. The used versioning system should be a distributed system, where the repository lives in开发者_JS百科side your working folder and not seperate as for example subversion with its client-server model.

What do you think? I'm sure there are applications out there using this approach, but I couldn't find one. Or is there a major drawback in this approach?


Sounds like an interesting idea. I know many applications claim they have "unlimited" undo and redo, but that's only back to the most recent time I opened this file. With your system, your application could "undo" to previous versions of the file, even before the version I saw the most recent time I opened this file -- that might be a nifty feature.

Have you looked at TortoiseHg? TortoiseHg uses Mercurial, which is "a distributed system, where the repository lives inside your working folder".

Rather than defining a new compressed versioned file format and all the software to work with it from scratch, perhaps you could use the Mercurial file format and borrow the TortoiseHg and Mercurial source code to work with it.

What happens if I'm working on a project using 2 different applications, and each application wants to store the entire project in its own slightly different compressed versioned file format?


What I found now is that OpenOffice aka LibreOffice has kind of versioning inside. LibreOffice file is a zip file with a structured content (XMLs, direcories, ...) inside. You are able to mark the current content as a version. This results in creating a VersionList.xml which contains information about all the versions. A Versions directory is added and this contains files like Version1, Version2 and so on. These files are the actual documents at that state.

0

精彩评论

暂无评论...
验证码 换一张
取 消