Thursday, November 15, 2012

Version control comparison

I put together this comparison of the data structures the various VCS's use.

Git
commit = info + tree + [commit]
tree = [(blob | tree | commit) + info]
tag = info + commit

Mercurial
commit = info + tree + (commit?, commit?)
tree = [file + info]
file = [info + (blob|diff)]
tag = file

Subversion
commit = info + tree + commit?
tree = [(tree | file) + info]
file = blob | diff
tag = tree

Bazaar
commit = info + tree + [commit]
tree = [type + text + info]
text = info + blob
branch = commit + info + tags + [commit]
tag = commit

Darcs
commit = info + [info + patch]
patch = file | ...

The differences are rather subtle, but make a big difference in UI.