New version control tools

Continuing the discussion from Haiku GitHub:

I saw that Meta started developing a generalized version control for any file format; binary files included. All that’s really needed is a differencing algorithm for each asset type covered by the project. That way bitmaps, textures and 3D models can use the same version control techniques and utilities as any other source control versioning software. Unfortunately, Meta’s was prerelease and not fully open-source yet.

Here’s the GitHub link to Sapling source control management. The open-source portion is GPL.

Pretty sure most version control systems handle binary files in some capacity. Git has explicit support for them; Fossil stores them as unversioned assets, through a different workflow; Mercurial (my current favorite) takes a hands-off stance, and I have to agree with them. File formats like XPM, PNM, OBJ or STL are already text-based and line-oriented. If you really really need to meaningfully diff (say) PNGs or ELF executables, maybe with the help of chunk-based filters, then you probably have super-specialized needs, and you’d be better served by a tool designed from the start for your domain.

Perforce Helix Core can version control across many file formats and integrations… But it’s commercial and doesn’t support Haiku.

Mercurial is a nice alternative but I don’t know of any hosting services left for it. Atlassian dropped Mercurial support from Bitbucket some time ago. At least it runs on Python.

Fossil is ANSI C and can self-host on a standard web server but it doesn’t supply integrations for media formats.

Meta will likely still take the cake because Sapling is only the client-side app. Hosting on a Meta server is only GitHub version 2.0 and has all the same baggage as Microsoft.

Hm…

To me in real world the matter was mostly not on binary files but other features: How are directories handled in general? What about empty directories? Symlinks? Hardlinks? File attributes (starting but not ending with POSIX file modes)?

Also many binary file formats already come with features to help diff-ing them. Such as that they impose artificial boundaries on their internal structures so that e.g. a header update doesn’t rewrite the data part of a file.

The only thing missing for me for git with haiku is extended attributes, and better performance other than that it is fine. Binary files work too. Don’t see why one could not render diffs for binary files

Indeed, to me it seems like comparison of binary files is something that can be done with most version control systems as long as they allow storing binary files. Years ago the SVN client I was using allowed setting up custom diff commands based on file type, and I used this to show differences between image files. I don’t remember the external image tool we used for that, though.

1 Like