Code

vcs-svn: parse svndiff0 window header
authorJonathan Nieder <jrnieder@gmail.com>
Wed, 13 Oct 2010 09:21:43 +0000 (04:21 -0500)
committerJonathan Nieder <jrnieder@gmail.com>
Mon, 28 Mar 2011 03:42:53 +0000 (22:42 -0500)
commit252712111fad127db365e3dd764309fe5658679a
tree3f28203392bb674751e05fb20908f882aa3d50f8
parentddcc8c5b469d2564dbacd629a873e7703f2dbd83
vcs-svn: parse svndiff0 window header

Each window in a subversion delta (svndiff0-format file) starts 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

Parse it.  The result is not usable for deltas with nonempty postimage
yet; in fact, this only adds support for deltas without any
instructions or auxiliary data.  This is a good place to stop, though,
since that little support lets us add some simple passing tests
concerning error handling to the test suite.

Improved-by: Ramkumar Ramachandra <artagnon@gmail.com>
Improved-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
t/t9011-svn-da.sh
vcs-svn/svndiff.c