For single-file revisions, with no directory except the root directory.
Manifest (you only need this to compute the $manifest_hash field
in the revision).
-----------------------------------------------
format_version "1"
dir ""
file "$filename"
content [$newfile_id]
-----------------------------------------------
Revision
-----------------------------------------------
format_version "1"
new_manifest [$manifest_id]
old_revision [$oldrev]
patch "$filename"
from [$oldfile_id]
to [$newfile_id]
------------------------------------------------
The interesting packets are:
[rdata $revision_id]
<base64(gzip($revision_data))>
[end]
[fdata $newfile_id]
<base64(gzip($newfile_data))>
[end]
$<x>_id is sha1($<x>_data)
The input parameters are $filename, $oldrev (the parent for this revision),
$oldfile_id (the version of the file in $oldrev), and $newfile_data (the new version
that you're committing).