vcs-svn: Skeleton of an svn delta parser
commit82b23a2a0ecfd0cf7ff89aaf56ceffff957c37ec
authorJonathan Nieder <jrnieder@gmail.com>
Wed, 13 Oct 2010 09:21:43 +0000 (13 04:21 -0500)
committerDavid Barr <david.barr@cordelta.com>
Sat, 23 Oct 2010 01:25:25 +0000 (23 12:25 +1100)
tree667e81502f090aac355cdb8837907cf7dda2ceef
parentc2e032a21d23e1a6e4b4dfa5ca5b0f5e891a07e6
vcs-svn: Skeleton of an svn delta parser

A delta in the subversion delta (svndiff0) format consists of the
magic bytes SVN\0 followed by a sequence of windows, each beginning
with a window header consisting of five integers (with variable-length
representation):

source view offset
source view length
output length
instructions length
auxiliary data length

Add an svndiff0_apply() function and test-svn-fe -d commandline tool
to parse such a delta in the special case of not including any
instructions or auxiliary data.

Later patches will add features to turn this into a fully functional
delta applier, for use by svn-fe in parsing the streams produced by
"svnrdump dump" and "svnadmin dump --deltas".

Helped-by: Ramkumar Ramachandra <artagnon@gmail.com>
Helped-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
svndiff.c
svndiff.h [new file with mode: 0644]