[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] svndumpfilter support for format v3

From: Stephen Butler <sbutler_at_elego.de>
Date: Thu, 22 Dec 2011 22:45:01 +0100

Hi folks,

Following up on a recent thread [1] about svndumpfilter's incompatibility
with the "v3" dump file format introduced in Subversion 1.1, I've started
to fix underlying API in this patch. Comment are welcome.

Is there an alternative solution that could be backported to 1.7?


[1] http://svn.haxx.se/users/archive-2011-10/0192.shtml

Enable svndumpfilter to handle dump format v3. Ensure that the output
format matches the input format, instead of just outputting the newest
supported format.

In the dump-parser, don't forget the format version number after
reading it. Instead, send the format version number to a (new)
callback. At long last, the callbacks give you the entire dump!

In svndumpfilter, the new callback prints the output format string.
In the other users, it doesn't do anything useful yet.

In svndumpfilter, treat a text-delta as text, without applying it.
AFAICT, this requires a special case in the dump-parser, so we have
another reason to rev that API.

### This patch doesn't handle property-deletions yet.

### This patch doesn't make dump-parsing any stricter.

* subversion/include/svn_repos.h
   svn_repos_parse_dumpstream3): New API version supporting a
   version-number callback and optional delta pass-through.
  (svn_repos_get_fs_build_parser4): Use svn_repos_parse_fns3_t.
   svn_repos_parse_dumpstream2): Deprecate.
   svn_repos_get_fs_build_parser3): Move these below the newly-
   deprecated struct declaration.

* subversion/libsvn_repos/load.c
  (parse_property_block): Use svn_repos_parse_fns3_t.
  (parse_text_block): Use svn_repos_parse_fns3_t. Allow handling
   deltas as text.
  (parse_format_version): Move some extra format version-checking
   to here...
  (svn_repos_parse_dumpstream3): ...from here. Call the new version
   callback. Pass the new deltas_are_text flag to parse_text_block.

* subversion/svndumpfilter/main.c
   delete_node_property): New callbacks.

* subversion/tests/cmdline/svndumpfilter_tests.py
  (dumpfilter_with_deltas): New test.
  (test_list): Add new test.

* subversion/libsvn_repos/load-fs-vtable.c
  (magic_header_record): New callback.
   svn_repos_load_fs4): Use the new API.

* subversion/svnrdump/load_editor.c
  (parse_baton): New 'format_version' member. No practical use.
  (magic_header_record): New callback.
  (svn_rdump__load_dumpstream): Use the new API.

* subversion/libsvn_repos/deprecated.c
   svn_repos_parse_dumpstream2): Backward compatibility boilerplate.

Stephen Butler | Consultant
elego Software Solutions GmbH
Gustav-Meyer-Allee 25, 13355 Berlin, Germany
tel: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elego.de
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719
Received on 2011-12-22 22:45:43 CET

This is an archived mail posted to the Subversion Dev mailing list.