vcs-svn: implement text-delta handling
commitc23aa573b3e7b45e0a1a5368d264ce7f71cd4ffd
authorDavid Barr <david.barr@cordelta.com>
Sat, 19 Mar 2011 07:20:54 +0000 (19 18:20 +1100)
committerJonathan Nieder <jrnieder@gmail.com>
Thu, 26 May 2011 07:28:04 +0000 (26 02:28 -0500)
tree39ebadb882518c899cf2db03a6a0ea784b512061
parent2dcdf9fa3de9e09e7b846ecde4e4cfd92ad1be72
vcs-svn: implement text-delta handling

Handle input in Subversion's dumpfile format, version 3.  This is the
format produced by "svnrdump dump" and "svnadmin dump --deltas", and
the main difference between v3 dumpfiles and the dumpfiles already
handled is that these can include nodes whose properties and text are
expressed relative to some other node.

To handle such nodes, we find which node the text and properties are
based on, handle its property changes, use the cat-blob command to
request the basis blob from the fast-import backend, use the
svndiff0_apply() helper to apply the text delta on the fly, writing
output to a temporary file, and then measure that postimage file's
length and write its content to the fast-import stream.

The temporary postimage file is shared between delta-using nodes to
avoid some file system overhead.

The svn-fe interface needs to be more complicated to accomodate the
backward flow of information from the fast-import backend to svn-fe.
The backflow fd is not needed when parsing streams without deltas,
though, so existing scripts using svn-fe on v2 dumps should
continue to work.

NEEDSWORK: generalize interface so caller sets the backflow fd, close
temporary file before exiting

Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
fast_export.c
fast_export.h
svndump.c