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>
5 files changed
tree: 43305b6ba2247fc4a3d798ed6b6e479eabeea140
  1. block-sha1/
  2. builtin/
  3. compat/
  4. contrib/
  5. Documentation/
  6. git-gui/
  7. git_remote_helpers/
  8. gitk-git/
  9. gitweb/
  10. perl/
  11. po/
  12. ppc/
  13. t/
  14. templates/
  15. vcs-svn/
  16. xdiff/
  17. .gitattributes
  18. .gitignore
  19. .mailmap
  20. abspath.c
  21. aclocal.m4
  22. advice.c
  23. advice.h
  24. alias.c
  25. alloc.c
  26. archive-tar.c
  27. archive-zip.c
  28. archive.c
  29. archive.h
  30. attr.c
  31. attr.h
  32. base85.c
  33. bisect.c
  34. bisect.h
  35. blob.c
  36. blob.h
  37. branch.c
  38. branch.h
  39. builtin.h
  40. bundle.c
  41. bundle.h
  42. cache-tree.c
  43. cache-tree.h
  44. cache.h
  45. check-builtins.sh
  46. check-racy.c
  47. check_bindir
  48. color.c
  49. color.h
  50. combine-diff.c
  51. command-list.txt
  52. commit.c
  53. commit.h
  54. config.c
  55. config.mak.in
  56. configure.ac
  57. connect.c
  58. convert.c
  59. copy.c
  60. COPYING
  61. csum-file.c
  62. csum-file.h
  63. ctype.c
  64. daemon.c
  65. date.c
  66. decorate.c
  67. decorate.h
  68. delta.h
  69. diff-delta.c
  70. diff-lib.c
  71. diff-no-index.c
  72. diff.c
  73. diff.h
  74. diffcore-break.c
  75. diffcore-delta.c
  76. diffcore-order.c
  77. diffcore-pickaxe.c
  78. diffcore-rename.c
  79. diffcore.h
  80. dir.c
  81. dir.h
  82. editor.c
  83. entry.c
  84. environment.c
  85. exec_cmd.c
  86. exec_cmd.h
  87. fast-import.c
  88. fetch-pack.h
  89. fixup-builtins
  90. fsck.c
  91. fsck.h
  92. generate-cmdlist.sh
  93. gettext.c
  94. gettext.h
  95. git-add--interactive.perl
  96. git-am.sh
  97. git-archimport.perl
  98. git-bisect.sh
  99. git-compat-util.h
  100. git-cvsexportcommit.perl
  101. git-cvsimport.perl
  102. git-cvsserver.perl
  103. git-difftool--helper.sh
  104. git-difftool.perl
  105. git-filter-branch.sh
  106. git-instaweb.sh
  107. git-lost-found.sh
  108. git-merge-octopus.sh
  109. git-merge-one-file.sh
  110. git-merge-resolve.sh
  111. git-mergetool--lib.sh
  112. git-mergetool.sh
  113. git-parse-remote.sh
  114. git-pull.sh
  115. git-quiltimport.sh
  116. git-rebase--interactive.sh
  117. git-rebase.sh
  118. git-relink.perl
  119. git-remote-testgit.py
  120. git-repack.sh
  121. git-request-pull.sh
  122. git-send-email.perl
  123. git-sh-setup.sh
  124. git-stash.sh
  125. git-submodule.sh
  126. git-svn.perl
  127. GIT-VERSION-GEN
  128. git-web--browse.sh
  129. git.c
  130. git.spec.in
  131. graph.c
  132. graph.h
  133. grep.c
  134. grep.h
  135. hash.c
  136. hash.h
  137. help.c
  138. help.h
  139. hex.c
  140. http-backend.c
  141. http-fetch.c
  142. http-push.c
  143. http-walker.c
  144. http.c
  145. http.h
  146. ident.c
  147. imap-send.c
  148. INSTALL
  149. levenshtein.c
  150. levenshtein.h
  151. list-objects.c
  152. list-objects.h
  153. ll-merge.c
  154. ll-merge.h
  155. lockfile.c
  156. log-tree.c
  157. log-tree.h
  158. mailmap.c
  159. mailmap.h
  160. Makefile
  161. match-trees.c
  162. merge-file.c
  163. merge-recursive.c
  164. merge-recursive.h
  165. name-hash.c
  166. notes-cache.c
  167. notes-cache.h
  168. notes-merge.c
  169. notes-merge.h
  170. notes.c
  171. notes.h
  172. object.c
  173. object.h
  174. pack-check.c
  175. pack-refs.c
  176. pack-refs.h
  177. pack-revindex.c
  178. pack-revindex.h
  179. pack-write.c
  180. pack.h
  181. pager.c
  182. parse-options.c
  183. parse-options.h
  184. patch-delta.c
  185. patch-ids.c
  186. patch-ids.h
  187. path.c
  188. pkt-line.c
  189. pkt-line.h
  190. preload-index.c
  191. pretty.c
  192. progress.c
  193. progress.h
  194. quote.c
  195. quote.h
  196. reachable.c
  197. reachable.h
  198. read-cache.c
  199. README
  200. reflog-walk.c
  201. reflog-walk.h
  202. refs.c
  203. refs.h
  204. remote-curl.c
  205. remote.c
  206. remote.h
  207. replace_object.c
  208. rerere.c
  209. rerere.h
  210. resolve-undo.c
  211. resolve-undo.h
  212. revision.c
  213. revision.h
  214. run-command.c
  215. run-command.h
  216. send-pack.h
  217. server-info.c
  218. setup.c
  219. sha1-lookup.c
  220. sha1-lookup.h
  221. sha1_file.c
  222. sha1_name.c
  223. shallow.c
  224. shell.c
  225. shortlog.h
  226. show-index.c
  227. sideband.c
  228. sideband.h
  229. sigchain.c
  230. sigchain.h
  231. strbuf.c
  232. strbuf.h
  233. string-list.c
  234. string-list.h
  235. submodule.c
  236. submodule.h
  237. symlinks.c
  238. tag.c
  239. tag.h
  240. tar.h
  241. test-chmtime.c
  242. test-ctype.c
  243. test-date.c
  244. test-delta.c
  245. test-dump-cache-tree.c
  246. test-genrandom.c
  247. test-index-version.c
  248. test-line-buffer.c
  249. test-match-trees.c
  250. test-mktemp.c
  251. test-parse-options.c
  252. test-path-utils.c
  253. test-run-command.c
  254. test-sha1.c
  255. test-sha1.sh
  256. test-sigchain.c
  257. test-subprocess.c
  258. test-svn-fe.c
  259. thread-utils.c
  260. thread-utils.h
  261. trace.c
  262. transport-helper.c
  263. transport.c
  264. transport.h
  265. tree-diff.c
  266. tree-walk.c
  267. tree-walk.h
  268. tree.c
  269. tree.h
  270. unimplemented.sh
  271. unpack-trees.c
  272. unpack-trees.h
  273. upload-pack.c
  274. url.c
  275. url.h
  276. usage.c
  277. userdiff.c
  278. userdiff.h
  279. utf8.c
  280. utf8.h
  281. walker.c
  282. walker.h
  283. wrap-for-bin.sh
  284. wrapper.c
  285. write_or_die.c
  286. ws.c
  287. wt-status.c
  288. wt-status.h
  289. xdiff-interface.c
  290. xdiff-interface.h
  291. zlib.c