Ramkumar Ramachandra <artagnon@gmail.com> (artagnon)

Patch Review
r1040959, r1040597, r1040482, r1005050, r1005035, r1004291, r1004286, r1003958, r1003064, r1002637, r1002507, r1002503, r1002502, r1002499, r1002470, r1002466, r1001313, r1001312, r1001304, r1001246, r1000065, r999938, r999917, r999838, r999825, r999820, r999799, r999759, r999757, r999755, r999536, r999507, r999474, r998942, r998933, r998863, r998859, r998853, r998802, r998798, r998795, r998779, r998775, r998772, r998769, r998661, r998654, r998653, r998648, r998646, r998644, r998502, r987530, r987513, r986754, r986567, r986566, r986466, r984496, r984463, r983266, r983263, r983261, r983255, r983248, r983222, r983096, r982964, r982948, r982929, r982918, r982900, r982863, r981966, r981876, r981266, r981246, r981214, r981196, r981170, r981164, r981075, r981074, r981039, r980910, r980889, r980547, r980179, r979975, r979974, r979710, r979395, r979390, r979295, r979282, r979261, r979254, r979094, r979011, r979002, r979000, r978852, r978841, r967159, r967157, r967149, r967075, r967056, r967046, r967040, r966851, r966841, r966790, r966784, r966723, r966654, r966649, r966358, r965498, r965495, r965492, r965466, r965464, r965427, r965418, r965301, r965296, r965294, r965125, r965115 r1004286

r1040959 | artagnon | 2010-12-01 05:30:23 -0600 (Wed, 01 Dec 2010)

Makefile.svn: Optionally allow building with threading support

* tools/dev/unix-build/Makefile.svn: Add new THREADING variable to
  control whether APR and Sqlite should be built with threading

Approved by: stsp

r1040597 | artagnon | 2010-11-30 10:02:11 -0600 (Tue, 30 Nov 2010)

community-guide: Rewrite the Buildbot section

* publish/docs/community-guide/building.part.html: Remove historical
  cruft and update with relevant information.

Approved by: hwright

r1040482 | artagnon | 2010-11-30 06:19:34 -0600 (Tue, 30 Nov 2010)

community-guide: Add new section referring to ^/tools/dev/unix-build

* publish/docs/community-guide/building.part.html: Add a new
  quickstart section pointing users to Makefile.svn

* publish/docs/community-guide/building.toc.html: Update the table of
  contents to include this new section.

Approved by: stsp

r1005050 | artagnon | 2010-10-06 09:17:33 -0500 (Wed, 06 Oct 2010)

svnrdump: Followup r1005035 to pass the only_trunk_A_with_changes_dump
test on Windows.

* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): Pass the only_trunk_A_with_changes_dump test on

r1005035 | artagnon | 2010-10-06 08:49:47 -0500 (Wed, 06 Oct 2010)

svnrdump: Disable debugging output in an attempt to fix the test
only_trunk_A_with_changes_dump on Windows.

* subversion/svnrdump/load_editor.c
  (): Guard debugging output with an #if 0

* subversion/svnrdump/dump_editor.c
  (): Guard debugging output with an #if 0

Suggested by: rhuijben

r1004291 | artagnon | 2010-10-04 10:36:03 -0500 (Mon, 04 Oct 2010)

Block r1004286 from being merged into the performance branch to avoid a cyclic merge

r1004286 | artagnon | 2010-10-04 10:26:44 -0500 (Mon, 04 Oct 2010)

Merge r985477 from subversion/branches/performance

* subversion/libsvn_subr/io.c
  (get_default_file_perms): Store the permissions of the created
  temporary file in a static variable and re-use it in subsequent
  calls instead of checking persmissions everytime. This has
  performance benefits.

Review by: artagnon
Approved by: julianfoad

r1003958 | artagnon | 2010-10-03 08:06:40 -0500 (Sun, 03 Oct 2010)

svnrdump: dump_editor: Don't use a named temporary file. It's more
expensive than using a random name for the temporary file.

* subversion/svnrdump/dump_editor.c
  (get_dump_editor): Use svn_io_open_unique_file3 to create and open
  the delta file instead of the more expensive

Suggested by: rhuijben

r1003064 | artagnon | 2010-09-30 08:39:27 -0500 (Thu, 30 Sep 2010)

svnrdump: dump_editor: Allocate directory baton in per-revision pool

* subversion/svnrdump/dump_editor.c

  (open_root, add_directory, make_directory_baton): Pass `eb->pool` to
  `make_dir_baton` because directory batons should be allocated in the
  per-revision pool.

  (make_dir_baton): Don't explicitly use `eb->pool`- allocate
  everything in the pool that is passed as argument.

r1002637 | artagnon | 2010-09-29 09:05:17 -0500 (Wed, 29 Sep 2010)

svnrdump: dump_editor: Remove the cruft surrounding handler_baton and
don't use a separate pool for applying the textdelta.

* subversion/svnrdump/dump_editor.h

  (handler_baton): Remove everything except the window_handler and the
  corresponding baton. Everything else is unnecessary.

* subversion/svnrdump/dump_editor.c

  (apply_textdelta): Remove the applier-specific pool and use the
  revision-specific pool and scratch pool instead. Track the changes
  in the handler_baton structrue and make appropriate local
  variables. Also, don't copy delta_abspath twice- just write it once.

r1002507 | artagnon | 2010-09-29 03:02:54 -0500 (Wed, 29 Sep 2010)

svnrdump: dump_editor: Fix issue related to incorrect pool being used
for allocation certain variables.

* subversion/svnrdump/dump_editor.c

  (change_dir_prop): `deleted_props` should be allocated in the
  per-revision pool `eb->pool`.

  (apply_textdelta): `base_checksum` should be allocated in the
  per-revision pool `eb->pool`.

r1002503 | artagnon | 2010-09-29 02:52:55 -0500 (Wed, 29 Sep 2010)

svnrdump: dump_editor: Avoid duplicating strings unnecessarily

* subversion/svnrdump/dump_editor.c

  (open_directory, close_directory, make_dir_baton): Instead of first
  allocating `copyfrom_path` in `pool` and then copying it to
  `eb->pool`, allocate it in `eb->pool` in the first place.

  (make_dir_baton): Don't unnecessarily copy a simple static string:
  let `abspath` point to a static string if `pb` does not exist.

r1002502 | artagnon | 2010-09-29 02:44:48 -0500 (Wed, 29 Sep 2010)

svnrdump: dump_editor: Followup r1002470 to avoid creating a toplevel
pool by changing the function that creates the per-revision pool.

* subversion/svnrdump/dump_editor.c

  (open_root): Don't create the per-revision pool here. Simply clear
  it after each iteration here.

  (get_dump_editor): Create the per-revision pool `eb->pool` here and
  make it a subpool of `pool` so that it's cleaned up when `pool` is
  cleaned up.

r1002499 | artagnon | 2010-09-29 02:36:11 -0500 (Wed, 29 Sep 2010)

svnrdump: dump_editor: Avoid allocating memory for extracting basename

* subversion/svnrdump/dump_editor.c

  (copen_directory, open_file): Since the call to svn_relpath_join
  allocates memory for the final path anyway, don't allocate memory
  after extracting the basename to join. From the svn_relpath_basename
  documentation, if pool is NULL, it simply returns a pointer to the
  string without allocating additional memory.

r1002470 | artagnon | 2010-09-29 00:08:42 -0500 (Wed, 29 Sep 2010)

svnrdump: dump_editor: Fix issues related to per-revision pool

* subversion/svnrdump/dump_editor.c

  (open_root): Mention that `eb->pool` is a per-revision pool and
  clear it in every iteration. Make it a toplevel pool since the
  lifetime of `pool` is not known.

  (close_edit): Remove useless svn_pool_destroy cruft since logs show
  that this function is never actually called.

r1002466 | artagnon | 2010-09-28 23:35:46 -0500 (Tue, 28 Sep 2010)

svnrdump: dump_editor: Remove unnecessary iterpool

* subversion/svnrdump/dump_editor.c
  (close_directory): Don't create a narrow iteration pool for just one
  variable. It hits performance and gives no significant memory

r1001313 | artagnon | 2010-09-25 15:08:30 -0500 (Sat, 25 Sep 2010)

svnrdump: Reorder dumpfile and pass test

* subversion/tests/cmdline/svnrdump_tests_data/descend-into-replace.expected.dump:
  Reorder a couple of nodes in the dumpfile to produce an equivalent dumpfile.

* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): Pass the descend_into_replace_dump test.

r1001312 | artagnon | 2010-09-25 15:05:31 -0500 (Sat, 25 Sep 2010)

svnrdump: Import descend-into-replace test

* subversion/tests/cmdline/svnrdump_tests_data/descend-into-replace.dump:
* subversion/tests/cmdline/svnrdump_tests_data/descend-into-replace.expected.dump:
  Import new testdata from svnsync_tests_data after converting the
  dumpfile from v2 to v3 for svnrdump.

* subversion/tests/cmdline/svnrdump_tests.py:
  (descend_into_replace_dump): Add new test to use added testdata.
  (test_list): Run the test, but mark it as a WIP due to dumpfile
  re-ordering issues.

r1001304 | artagnon | 2010-09-25 14:35:15 -0500 (Sat, 25 Sep 2010)

svnrdump: Reorder testdata dumpfile

* subversion/tests/cmdline/svnrdump_tests_data/trunk-A-changes.expected.dump:
  Reorder one node in the dumpfile to produce an equivalent dumpfile.
* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): Pass the only_trunk_A_with_changes_dump test.

r1001246 | artagnon | 2010-09-25 10:58:58 -0500 (Sat, 25 Sep 2010)

svnrdump: load_editor: Fix the docstrings in the header.

* subversion/svnrdump/load_editor.h
  (get_dumpstream_loader, drive_dumpstream_loader): Update docstrings.

Found by: danielsh

r1000065 | artagnon | 2010-09-22 11:17:10 -0500 (Wed, 22 Sep 2010)

svnrdump: dump_editor.c: Consistently allocate data for props from the
same memory pool. Incidentally, this fixes two tests that were
breaking on ra_svn earlier.

* subversion/svnrdump/dump_editor.c
  (dump_props, change_dir_prop, change_file_prop, close_file): Memory
  for `eb->props` and `eb->deleted_props` was being taken from
  `pool`. Change all these instances to use `eb->pool` instead.

r999938 | artagnon | 2010-09-22 08:36:07 -0500 (Wed, 22 Sep 2010)

* subversion/tests/cmdline/svnrdump_tests_data/trunk-only.dump,
   Import new testdata from svnsync_tests_data after converting the
   dumpfile from v2 to v3 for svnrdump.

* subversion/tests/cmdline/svnrdump_tests.py

  (run_dump_test): Extend function to accept an optional subdirectory
  parameter. Update its docstring.

  (only_trunk_dump, only_trunk_A_with_changes_dump): Add a couple of
  tests to use the added testdata.

  (run_test): Run both tests- mark only_trunk_dump as passing and
  only_trunk_A_with_changes_dump as WIP since it fails.

r999917 | artagnon | 2010-09-22 07:49:19 -0500 (Wed, 22 Sep 2010)

svnrdump: Fix bug in dumper related to normalization of propstrings.

* subversion/tests/cmdline/svnrdump_tests_data/copy-bad-line-endings.dump:
  Import new test data from svnsync_tests_data after converting the
  dumpfile from v2 to v3 for svnrdump.

* subversion/tests/cmdline/svnrdump_tests_data/copy-bad-line-endings.expected.dump:
  Import new test data from svnsync_tests_data after converting the
  dumpfile from v2 to v3 for svnrdump.

* subversion/svnrdump/dump_editor.c

  (normalize_props): Write a new function to normalize a given
  property hashtable in-place. We have used the more versatile
  `svn_subst_translate_cstring2` with the `repair` feature as opposed
  to the more generic `svn_subst_translate_string` to perform the
  actual normalization.

  (dump_props): Use normalize_props to normalize the properties before
  dumping them.

* subversion/svnrdump/dump_editor.h

  (normalize_props): Expose function through header so that svnrdump.c
  can use it too for normalizing revprops.

* subversion/svnrdump/svnrdump.c

  (replay_revstart): Normalize the revprops using normalize_props.

* subversion/tests/cmdline/svnrdump_tests.py

  (run_dump_test, run_load_test): Extend the functions to accept one
  extra argument `expected_dumpfile_name` to handle the assymetric
  case: loading a dumpfile into a repository doesn't necessarily
  produce the same dumpfile when a dump is invoked.

  (copy_bad_line_endings_dump): Add test to use the added testdata.

  (test_list): Run the added test and mark it as passing.

r999838 | artagnon | 2010-09-22 04:40:38 -0500 (Wed, 22 Sep 2010)

* subversion/tests/cmdline/svnrdump_tests_data/repo-with-copy-of-root-dir.dump:
  Import new test data from svnsync_tests_data after converting the
  dumpfile from v2 to v3 for snvrdump.
* subversion/tests/cmdline/svnrdump_tests.py
  (skeleton_dump): Add a test to dump the skeleton repository for
  (commit_a_copy_of_root_dump, commit_a_copy_of_root_load): Add a
  couple of tests to use the new test data.
  (test_list): Run the three new tests and mark them as passing.

r999825 | artagnon | 2010-09-22 04:22:21 -0500 (Wed, 22 Sep 2010)

svnrdump: Import a couple of testdata files from svnsync_tests_data
involving tagging the trunk. Write tests to use the data and mark them
as passing.

* subversion/tests/cmdline/svnrdump_tests_data/tag-trunk-with-file.dump:
  Import test data from svnsync_tests_data after converting the
  dumpfile from v2 to v3 for svnrdump.

* subversion/tests/cmdline/svnrdump_tests_data/tag-trunk-with-file2.dump:
  Import test data from svnsync_tests_data after converting the
  dumpfile from v2 to v3 for svnrdump.

* subversion/tests/cmdline/svnrdump_tests.py

  (tag_trunk_with_file_dump, tag_trunk_with_file_load,
  tag_trunk_with_file2_dump, tag_trunk_with_file2_load): Write a tests
  to use the added testdata.

  (test_list): Run the added tests and mark them as passing.

r999820 | artagnon | 2010-09-22 04:05:29 -0500 (Wed, 22 Sep 2010)

svnrdump: Fix a bug in the loader concerning a relative path being fed
to the commit_editor's open_directory.

* subversion/svnrdump/load_editor.c
  (new_node_record): The commit_editor's open_directory takes absolute
  paths, not paths relative to the ancestor_path.

* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): Pass the move_and_modify_in_the_same_revision_load test.

r999799 | artagnon | 2010-09-22 03:26:35 -0500 (Wed, 22 Sep 2010)

* subversion/svnrdump/load_editor.c
  (set_node_property): Restructure into a switch-case statement for
  clarity and correct the debugging output when it's a directory node.

r999759 | artagnon | 2010-09-22 00:23:13 -0500 (Wed, 22 Sep 2010)

svnrdump: Cosmetically rename a couple of variables, essentially
stripping off the `_pending` part from the variables
`dump_props_pending` and `dump_newlines_pending`.

* subversion/svnrdump/dump_editor.c

  (dump_edit_baton): Rename dump_props_pending to dump_props and
  dump_newlines_pending to dump_newlines.

  (dump_node, delete_entry, add_directory, open_directory,
  close_directory, add_file, open_file, change_dir_prop,
  change_file_prop, close_file): Track this change.

r999757 | artagnon | 2010-09-22 00:16:37 -0500 (Wed, 22 Sep 2010)

svnrdump: Remove dead `dump_props`. This variable is a historical crux
that isn't being set to TRUE anywhere, and is therefore actually
unused. To justify this change further, it should be noted that no
tests break.

* subversion/svnrdump/dump_editor.c

(dump_edit_baton): Remove the dead `dump_props` variable.

  (dump_node): Remove all statements involving `dump_props`, and
  write/ update comments to justify this.

  (close_file): Remove all instances of `dump_props` updating comments

r999755 | artagnon | 2010-09-21 23:53:09 -0500 (Tue, 21 Sep 2010)

svnrdump: Fix a bug related to dumping the properties of a directory
copied from a previous revision.

* subversion/svnrdump/dump_editor.c

  (dump_edit_baton): Add a new dump_newlines_pending boolean.

  (dump_node): If a directory is copied from a previous revision, set
  dump_newlines_pending so we can write blank lines if change_dir_prop
  isn't called.

  (dump_newlines): Create a function that resembles dump_props to
  print couple of blank lines.

  (add_directory, open_directory, delete_entry, close_directory,
  add_file, open_file): Add a call to dump_newlines trigger by

  (change_dir_prop): Trigger dumping props whether or not the
  directory has already been written out, and unset
  dump_newlines_pending because dump_props takes care of that.

* subversion/tests/cmdline/svnrdump_tests.py

  (test_list): Pass the move_and_modify_in_the_same_revision_dump

r999536 | artagnon | 2010-09-21 13:45:05 -0500 (Tue, 21 Sep 2010)

svnrdump: Fix a bug in the load_editor related to opening directories
recursively until the desired path is reached.

* subversion/svnrdump/load_editor.c
  (new_node_record): The delta editor's `open_directory` requires the
  full relative path after `ancestor_path`, not just a path
  component. Since we're anyway building up `rb->db->relpath` using
  the individual components, rip off the `ancestor_path` from it
  before using it with `open_directory`.

* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): Pass the copy_revprops_load test.

r999507 | artagnon | 2010-09-21 12:11:50 -0500 (Tue, 21 Sep 2010)

* subversion/svnrdump/dump_editor.c
  (delete_entry): Duplicate the string that we're using as the key of
  the hashtable before entering it into the hashtable.
  (make_dir_baton): Fix the logic to sanitize and set `abspath` and
* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): Mark the url_encoding_dump test as passing.

r999474 | artagnon | 2010-09-21 10:59:31 -0500 (Tue, 21 Sep 2010)

svnrdump: Mark tests that fail conditionally on ra_dav as WIP
for the buildbot.

* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): dir_prop_change_load, url_encoding_dump,
  move_and_modify_in_the_same_revision_load pass on ra_local but FAIL
  on ra_dav. copy_revprops_load XPASS'ed on ra_dav. Fix these problems
  appropriately to reflect the current status accurately.

r998942 | artagnon | 2010-09-20 09:20:00 -0500 (Mon, 20 Sep 2010)

* subversion/svnrdump/dump_editor.c
  (apply_textdelta): Followup r998933 to fix the build on
  Windows. Don't put declarations after statements: this is a C89

r998933 | artagnon | 2010-09-20 08:59:09 -0500 (Mon, 20 Sep 2010)

svnrdump: dump_editor: Fix a bug related the data corruption in
deleted_entries hashtable.

* subversion/svnrdump/dump_editor.c

  (make_dir_baton): Increase the lifetime of deleted_entries hashtable
  by allocating it in eb->pool instead of pool.

  (delete_entry): Don't wastefully duplicate the path string before
  putting it in the hashtable.

  (close_directory): Use iterpool correctly- it should only be used
  for the loop variable, not for the call to dump_node. Don't
  wastefully clear the pool in the middle of the loop. Also, at the
  end of the routine, clear the deleted_props hash to indicate that
  we've dumped them.

* subversion/tests/cmdline/svnrdump_tests_data/url-encoding-bug.dump:
  Import new test data from svnsync_tests_data after converting the
  dumpfile from v2 to v3.

* subversion/tests/cmdline/svnrdump_tests.py

  (url_encoding_dump, url_encoding_load): Add a couple of tests to use
  the above testdata.

  (test_list): Run both tests and mark them as passing. The dump test
  would have failed without bugfix in dump_editor.c (ironically, not
  for URL encoding reasons).

r998863 | artagnon | 2010-09-20 05:14:11 -0500 (Mon, 20 Sep 2010)

* subversion/svnrdump/dump_editor.c
  (open_root): Followup r998859 to make the LDR_DBG output the
  constructed the root_baton at the end of open_root.

r998859 | artagnon | 2010-09-20 04:55:40 -0500 (Mon, 20 Sep 2010)

* subversion/svnrdump/dump_editor.c
  (): Add an LDR_DBG macro to output debugging information using
  SVN_DBG. This is the same macro we've used in load_editor.c.

  (open_root, delete_entry, add_directory, open_directory,
  close_directory, add_file, open_file, change_dir_prop,
  change_file_prop, apply_textdelta, close_file, close_edit): Use the
  LDR_DBG macro to print some useful information everytime these
  callbacks are fired.

r998853 | artagnon | 2010-09-20 04:43:35 -0500 (Mon, 20 Sep 2010)

* subversion/svnsync/main.c
  (get_lock): Add a comment explaining what the function does along
  with a note about it being duplicated in svnrdump.

* subversion/svnrdump/load_editor.c
  (get_lock): Add a comment explaining what the function does along
  with a note about it being duplicated in svnsync.

Approved by: danielsh

r998802 | artagnon | 2010-09-20 01:52:42 -0500 (Mon, 20 Sep 2010)

* subversion/tests/cmdline/svnrdump_tests_data/revprops.dump: Add new
  test data from svnsync_tests_data after converting the dumpfile from
  v2 to v3 for svnrdump.

* subversion/tests/cmdline/svnrdump_tests.py
  (copy_revprops_dump, copy_revprops_load): Add a couple of tests to
  use the new test data.

  (move_and_modify_in_the_same_revision_load): Load counterpart of the
  move_and_modify_in_the_same_revision_dump test. The failure of this
  test is possibly related to the failure of the copy_revprops_load

  (test_list): Run the copy_revprops_* tests. Mark the dump
  counterpart as passing, but mark the load counterpart as a WIP since
  it fails. Also, run the move_and_modify_in_the_same_revision_load
  test and mark it as a WIP. Both the load tests fail in the same
  fashion, citing that a certain path doesn't exist.

r998798 | artagnon | 2010-09-20 01:33:48 -0500 (Mon, 20 Sep 2010)

* subversion/tests/cmdline/svnrdump_tests_data/copy-parent-modify-prop.dump:
  Add new test data from svnsync_tests_data after converting the
  dumpfile from v2 to v3 for svnrdump.

* subversion/tests/cmdline/svnrdump_tests.py
  (copy_parent_modify_prop_dump, copy_parent_modify_prop_load): Add a
  couple of tests to use the added test data.
  (test_list): Run the added tests and mark them as passing.

r998795 | artagnon | 2010-09-20 01:25:49 -0500 (Mon, 20 Sep 2010)

* subversion/svnrdump/dump_editor.c
  (dump_node): Fix a bug related to removing leading slashes from
  `path` and `copyfrom_path`. When `path` or `copyfrom_path` is "/",
  increment the corresponding pointer to make the string read '\0'
  (NULL terminator).

* subversion/tests/cmdline/svnrdump_tests_data/dir-prop-change.dump:
  Add new test data from svnsync_tests_data after converting the
  dumpfile from v2 to v3.

* subversion/tests/cmdline/svnrdump_tests.py
  (dir_prop_change_dump, dir_prop_change_load): Add a couple of tests
  to use the added testdata.
  (test_list): Run the tests. Mark both as passing- the dump test
  passes after the bugfix in dump_editor.c.

r998779 | artagnon | 2010-09-19 23:36:01 -0500 (Sun, 19 Sep 2010)

* subversion/tests/cmdline/svnrdump_tests_data/tag-empty-trunk.dump:
  Add new test data from svnsync_tests_data after converting the
  dumpfile from v2 to v3 for svnrdump.
* subversion/tests/cmdline/svnrdump_tests.py
  (tag_empty_trunk_dump, tag_empty_trunk_load): Add a couple of tests
  to use the added test data.
  (test_list): Run the added tests and mark them as passing.

r998775 | artagnon | 2010-09-19 23:18:26 -0500 (Sun, 19 Sep 2010)

* subversion/tests/cmdline/svnrdump_tests.py: Write a large comment
  explaining mismatched_headers_re.

Suggested by: danielsh

r998772 | artagnon | 2010-09-19 22:58:45 -0500 (Sun, 19 Sep 2010)

* subversion/svnrdump/load_editor.c: Prefix SVNRDUMP_PROP_LOCK with

Suggested by: danielsh

r998769 | artagnon | 2010-09-19 22:44:33 -0500 (Sun, 19 Sep 2010)

* subversion/tests/cmdline/svntest/verify.py
  (ExpectedOutput.matches_except): Raising strings are disallowed in
  Python >=2.6. Wrap the string in an Exception object instead.

Suggested by: arfrever

r998661 | artagnon | 2010-09-19 08:41:50 -0500 (Sun, 19 Sep 2010)

* subversion/tests/cmdline/svnrdump_tests_data/move-and-modify.dump:
  Add new test data from svnsync_tests_data after converting the
  dumpfile from v2 to v3.
* subversion/tests/cmdline/svnrdump_tests.py
  (move_and_modify_in_same_revision_dump): Add a new test to use the
  test data.
  (test_list): Run the new test, but mark it as a WIP because the test

r998654 | artagnon | 2010-09-19 08:19:58 -0500 (Sun, 19 Sep 2010)

* subversion/tests/cmdline/svnrdump_tests_data/modified-in-place.dump:
  Add new test data from svnsync_tests_data after converting the
  dumpfile from v2 to v3 for svnrdump.

* subversion/tests/cmdline/svnrdump_tests.py
  (modified_in_place_dump, modified_in_place_load): Add a couple of
  tests to use the testdata we have added.
  (test_list): Run the two new tests and mark them as passing.

r998653 | artagnon | 2010-09-19 08:08:21 -0500 (Sun, 19 Sep 2010)

* subversion/tests/cmdline/svnrdump_tests_data/copy-from-previous-version-and-modify.dump:
  Import new testdata from svnsync_test_data after converting the
  dumpfile from v2 to v3 for svnrdump.

* subversion/tests/cmdline/svnrdump_tests.py
  copy_from_previous_version_and_modify_load): Add a couple of tests
  to use the above test data.
  (test_list): Add the two new tests and mark them as passing.

r998648 | artagnon | 2010-09-19 07:50:17 -0500 (Sun, 19 Sep 2010)

* subversion/tests/cmdline/svnrdump_tests_data/no-author.dump: Add new
  testdata. This is the dumpfile v2 taken from
  svnsync_tests_data/no-author.dump and converted to v3.
* subversion/tests/cmdline/svnrdump_tests.py
  (no_author_dump, no_author_load): Add a couple of tests to exercise
  dumping and loading functionality with the new no-author.dump.
  (test_list): Run the no_author_dump and no_author_load tests. Mark
  them as passing.

r998646 | artagnon | 2010-09-19 07:43:12 -0500 (Sun, 19 Sep 2010)

* subversion/tests/cmdline/svnrdump_tests.py:

  (basic_dump, revision_0_dump, revision_0_load, skeleton_load,
  copy_and_modify_dump, copy_and_modify_load): Change the docstrings
  to follow the convention "dump|load: <test description>" so that
  it's clear which kind of test we're running.

  (test_list): Cosmetically rearrange a couple of lines. For most
  tests, first execute dump test and then execute load test.

r998644 | artagnon | 2010-09-19 07:38:36 -0500 (Sun, 19 Sep 2010)

Add some testing infrastructure to exclude comparison of certain lines
specified by a regular expression so that svnrdump dump tests can
report actual failures. Exercise this infrastructure in
svnrdump_tests.py. This is necessary because there is some mismatch
between the headers that `svnadmin dump` and `svnrdump dump` are able
to provide.

* subversion/tests/cmdline/svntest/verify.py

  (ExpectedOutput.matches_except): Write new function that resembling
  ExpectedOutput.display_lines with an extra except_re argument. It
  compares EXPECTED and ACTUAL on an exact line-by-line basis,
  excluding lines that match the regular expression specified in

  (ExceptedOutput.matches): Modify function to accept one more
  optional argument: except_re. Call matches_except if except_re is
  not None.

  (compare_and_display_lines): Take an extra argument except_re that
  defaults to None, and call ExcpectedOutput.matches with this

* subversion/tests/cmdline/svnrdump_tests.py

  (mismatched_headers_re): Declare a new global string that specifies
  the headers in which a mismatch is expected during a dumping

  (run_dump_test): Pass the above regular expression string to

  (test_list): Mark copy_and_modify_dump as a passing test.

r998502 | artagnon | 2010-09-18 12:54:50 -0500 (Sat, 18 Sep 2010)

* subversion/svnrdump/load_editor.c: Attempt to acquire a lock of
  sorts before attempting to load. This also ensures that
  pre-revprop-change is enabled before it's too late.

  (get_lock): Add new function based on the corresponding function in
  svnsync/main.c. The locking operation can be described as attempting
  to change a dummy revprop in a delay-loop.

  (new_revision_record): Before doing anything else, call get_lock and
  release it at the end of the operations.

r987530 | artagnon | 2010-08-20 09:56:32 -0500 (Fri, 20 Aug 2010)

* subversion/svnrdump/svnrdump.c
  (load_cmd): A closer look shows that r987513 doesn't do what it
  promises. Revert it.

* subversion/svnrdump/load_editor.c
  (drive_dumpstream_loader): Add a TODO note about trying to find out
  if we can set the revprops.

r987513 | artagnon | 2010-08-20 09:08:42 -0500 (Fri, 20 Aug 2010)

* subversion/svnrdump/svnrdump.c
  (load_cmd): Check that we can set revprops before attempting to
  drive the load editor.

r986754 | artagnon | 2010-08-18 10:55:19 -0500 (Wed, 18 Aug 2010)

* subversion/svnrdump/svnrdump.1:
  Update the description of svnrdump to reflect the fact that it does
  both dumping and loading now.

* subversion/svnrdump/svnrdump.c
  (svn_opt_subcommand_desc2_t): Update the description of the load
  subcommand to reflect that the functionality is now ready.

* build.conf
  (svnrdump): Update the description of svnrdump to reflect the fact
  that it does both dumping and loading now.

Approved by: danielsh

r986567 | artagnon | 2010-08-18 00:34:27 -0500 (Wed, 18 Aug 2010)

* subversion/svnrdump/dump_editor.c
  (open_file): Followup r986466 to fix a silly mistake concerning the
  order of the arguments in svn_relpath_join.

Found by: rhuijben

r986566 | artagnon | 2010-08-18 00:26:55 -0500 (Wed, 18 Aug 2010)

* branches/ra-uuid: Remove branch. We have determined that this is a
  bad idea from a discussion on the mailing list.

r986466 | artagnon | 2010-08-17 14:48:32 -0500 (Tue, 17 Aug 2010)

* subversion/svnrdump/dump_editor.c
  (open_file): Simplify a block of code that pushes to an array and
  then calls svn_path_compose; use svn_relpath_join instead.

r984496 | artagnon | 2010-08-11 12:56:06 -0500 (Wed, 11 Aug 2010)

* subversion/svnrdump/load_editor.c
  (new_node_record): Without sufficient information in the
  revprop_table, we cannot create the commit_editor. Make this clear
  by not looking for the revprop_table first and add a comment about

r984463 | artagnon | 2010-08-11 11:29:11 -0500 (Wed, 11 Aug 2010)

* subversion/tests/cmdline/svnrdump_tests.py
  (copy_and_modify_dump, copy_and_modify_load): Modify docstrings to
  reflect that they're two different tests.

Suggested by: danielsh

r983266 | artagnon | 2010-08-07 12:38:01 -0500 (Sat, 07 Aug 2010)

* subversion/svnrdump/load_editor.c
  (new_node_record): For closing directories, use the lighter
  svn_path_component_count instead of svn_path_decompose, since we
  don't need the individual components to close directories. Also,
  don't tax the rb->pool unnecessarily- use the scratch pool for the
  local variables.

r983263 | artagnon | 2010-08-07 12:29:47 -0500 (Sat, 07 Aug 2010)

svnrdump: Fix the failing skeleton_load test.

* subversion/svnrdump/load_editor.c
  (new_node_record): Use the APR_ARRAY_IDX macro instead of attempting
  to access an element by hand.
* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): Pass the skeleton_load test.

Suggested by: danielsh

r983261 | artagnon | 2010-08-07 12:20:43 -0500 (Sat, 07 Aug 2010)

* subversion/svnrdump/load_editor.c
  (set_revision_property): Wrap the svn_ra_change_rev_prop call in

Found by: danielsh

r983255 | artagnon | 2010-08-07 11:23:23 -0500 (Sat, 07 Aug 2010)

* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): r983248 breaks skeleton_load test on ra_local and
  ra_svn. Mark it XFail appropriately.

r983248 | artagnon | 2010-08-07 10:41:20 -0500 (Sat, 07 Aug 2010)

svnrdump: Rework the directory baton linked-list code in the load
editor fixing crashes that went unnoticed earlier.

* subversion/svnrdump/load_editor.c (new_node_record):

  residual_path needs to be split into two separate variables:
  residual_close_path and residual_open_path because they're
  fundamentally asymmetric; (number of directories to close) is not
  necessarily equal to (number of directories to subsequently open to
  get where we want): DFS only guarantees that former number is less
  than or equal to the latter, although we're not using this property.

  Correct the arguments in the call to svn_path_compare_paths, and
  replace nb->path by the dirname of nb->path; it makes no sense to
  compare a path *with* a filename against one that does not. For
  directories, add_directory takes care of adding to the linked-list

  In add_directory, correct the relpath of the child_baton: there's no
  need to invoke some complex appending logic- provided that the code
  prior to reaching points works fine and calls open_directory
  appropriately, the relpath should just be the path of the directory
  in nb->path.

  When creating a new child_baton, don't forget to set the parent.

r983222 | artagnon | 2010-08-07 07:31:50 -0500 (Sat, 07 Aug 2010)

svnrdump: Fix a bug in the load_editor; it was unable to handle
revisions without node information previously.

* subversion/svnrdump/load_editor.c
  (close_revision): Add a new if-branch; if the commit_editor doesn't
  exist, create one, open_root and close_edit on it to indicate that
  we've finished processing the revision. While at it, also fix

r983096 | artagnon | 2010-08-06 14:10:20 -0500 (Fri, 06 Aug 2010)

svnrdump: Fix a bug involving svn_node_action_delete

* subversion/svnrdump/load_editor.c
  (new_node_record, apply_textdelta, close_node): Fix the tense of the
  LDR_DBG messages.
  (new_node_record): Extract base_checksum header. Also, no Node-Kind
  information is present during a svn_node_action_delete, so don't
  look for it and blindly delete the given entry.
  (apply_textdelta): Use the extracted base_checksum while applying
  the textdelta.

* subversion/svnrdump/load_editor.h
  (node_baton): Add a new base_checksum field.

r982964 | artagnon | 2010-08-06 08:56:42 -0500 (Fri, 06 Aug 2010)

* subversion/svnrdump/load_editor.c
  (new_node_record): Handle the open_file case and fix the
  fall-through in the switch case statement.

* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): Pass the skeleton_load and copy_and_modify_load
  tests. These were fixed by rhuijben in r982957.

r982948 | artagnon | 2010-08-06 08:17:31 -0500 (Fri, 06 Aug 2010)

* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): Mark skeleton_load and copy_and_modify_load as Wimp
  only for ra_dav. They pass with ra_svn now.

r982929 | artagnon | 2010-08-06 06:05:58 -0500 (Fri, 06 Aug 2010)

* subversion/svnrdump/load_editor.c
  (apply_textdelta, close_node): Move the call to close_file from
  apply_textdelta to close_node, relying on the fact that
  apply_textdelta will always be called after a file is opened or

Found by: rhuijben
Suggested by: danielsh

r982918 | artagnon | 2010-08-06 05:07:13 -0500 (Fri, 06 Aug 2010)

* subversion/svnrdump/load_editor.c
  (new_node_record): Canonicalize the initial relpath.
  (new_node_record): After an add_directory, add the child_baton to
  the directory baton linked list.

Noticed by: rhuijben

r982900 | artagnon | 2010-08-06 02:41:51 -0500 (Fri, 06 Aug 2010)

svnrdump: Make the load editor respect the rules of an
svn_delta_editor_t strictly by calling open_directory and
close_directory where appropriate.

* subversion/svnrdump/load_editor.h

  (parse_baton): Remove pool and use the one in the revision_baton

  (directory_baton): New structure to wrap the unexposed dir_context_t
  in commit.c. This is useful to keep track of how deep our directory
  baton is and provide a link the the parent.

  (revision_baton): Change the type of the directory baton from void *
  to struct directory_baton *.

* subversion/svnrdump/load_editor.c

  (new_revision_record, new_node_record, set_revision_property,
  set_node_property, delete_node_property, apply_textdelta,
  close_revision): Track the change in the pool's location.

  (new_node_record): While creating the commit_editor, also create a
  toplevel directory baton. Add some logic to open and close
  directories and set the directory baton appropriately depending on
  how much the dirname of the file we're adding differs from the our
  current directory baton's path.

  (close_revision): Close any open directories before closing the edit
  session itself.

r982863 | artagnon | 2010-08-05 22:53:04 -0500 (Thu, 05 Aug 2010)

* subversion/svnrdump/load_editor.c
  (new_node_record): Remove incorrect comment about the historical
  detail in the commit editor, and handle the svn_node_action actions/
  svn_node_kind_t file and dir kind explicitly.
  (set_revision_property): Remove an extra pair of brackets.
  (remove_node_props): Add a comment about this function not being
  (apply_textdelta): Close the file after apply the textdelta.
  (close_node): Remove the close_file, close_directory calls from
  here. It's incorrect to put them here.
  (close_revision): Add a close_directory call corresponding to the
  toplevel open_root.

* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): Mark copy_and_modify_load as failing for ra_svn, as it
  only seemed to work by accident.

r981966 | artagnon | 2010-08-03 12:07:16 -0500 (Tue, 03 Aug 2010)

* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): Mark the skeleton_load and copy_and_modify_load tests
  as Wimp only for ra_dav; they've been fixed for ra_svn in r981876.

r981876 | artagnon | 2010-08-03 08:45:21 -0500 (Tue, 03 Aug 2010)

* subversion/svnrdump/load_editor.c
  (new_node_record, set_revision_property): Don't use repos_url from
  the comit_edit_baton. Use svn_ra_get_repos_root2 in
  set_revision_property instead. Also, use svn_path_url_add_component2
  instead of svn_uri_join so that escaping is handled properly.

* subversion/svnrdump/load_editor.h
  (commit_edit_baton): Remove structure as it's not required anymore.
  (parse_baton): Add a new root_url field.

r981266 | artagnon | 2010-08-01 11:42:04 -0500 (Sun, 01 Aug 2010)

svnrdump: Make copyfrom data work and add corresponding passing test

* subversion/svnrdump/load_editor.c
  (new_node_record): Use the data in the commit_edit_baton to
  construct a full URI for the copyfrom_path.

* subversion/svnrdump/load_editor.h
  (commit_edit_baton): Import the edit_baton structure from commit.c
  since we need to derefence it to get out the repos_url.

* subversion/tests/cmdline/svnrdump_tests.py
  (copy_and_modify, copy_and_modify_load, copy_and_modify_dump): Split
  the copy_and_modify test into two specialized tests: one for
  dumping, and another for loading. The load test should pass now.

r981246 | artagnon | 2010-08-01 10:31:54 -0500 (Sun, 01 Aug 2010)

* subversion/svnrdump/load_editor.c
  (new_node_record): Give copyfrom_path and copyfrom_rev sensible
  initial values before they're set.

Found by: rhuijben

r981214 | artagnon | 2010-08-01 07:43:42 -0500 (Sun, 01 Aug 2010)

* subversion/svnrdump/load_editor.c
  (new_node_record): Remove useless call to set_target_revision and
  correct the base_revision argument of open_root.

r981196 | artagnon | 2010-08-01 05:18:57 -0500 (Sun, 01 Aug 2010)

svnrdump: Make the skeleton_load test pass.

* subversion/tests/cmdline/svnrdump_tests.py
  (test_list): Remove the Wimp marker for skeleton_load.

* subversion/svnrdump/load_editor.c
  (set_property_node, delete_property_node): Fill in the functions to
  call the appropriate callbacks in the commit_editor.
  (set_revision_property, close_node): Remember svn:author and set it
  after commit_editor has finished since it passes through.

* subversion/svnrdump/load_editor.h
  (revision_baton): Add a new author field.

r981170 | artagnon | 2010-08-01 02:58:51 -0500 (Sun, 01 Aug 2010)

svnrdump: Fix load test that was broken due to an interactive
authentication prompt

* subversion/tests/cmdline/svntest/main.py
  (run_svnrdump): Add an extra stdin_input argument and call
  run_command_stdin when the argument is present to account for the
  load functionality in svnrdump. Wrap both varargs in _with_auth and
* subversion/tests/cmdline/svntest/actions.py
  (run_and_verify_svnrdump_dump, run_and_verify_svnrdump_load,
  run_and_verify_svnrdump): Merge the specalized versions of the
  functions into a generalized version, since the logic to handle
  input is now in run_svnrdump.

* subversion/tests/cmdline/svnrdump_tests.py
  (run_dump_test, run_load_test): Improve docstrings, and track the
  API change to just call run_and_verify_svnrdump with different

Found by: danielsh

r981164 | artagnon | 2010-08-01 01:07:49 -0500 (Sun, 01 Aug 2010)

* branches/ra-uuid: Add a new branch for developing the functionality
  to set a repository's UUID over the RA layer.

r981075 | artagnon | 2010-07-31 11:52:01 -0500 (Sat, 31 Jul 2010)

svnrdump: Add some WIP tests for loading

* subversion/tests/cmdline/svnrdump_tests_data/skeleton.dump: Import
  this dumpfile from svnadmin_tests_data after converting to dumpfile
  v3 format. This is used in the skeleton_load test in svnrdump.

* subversion/tests/cmdline/svntest/actions.py

  (run_and_verify_dump): Add a new argument delta to run 'svnadmin
  dump' with '--deltas', since svnrdump can only be checked against

  (run_and_verify_svnrdump, run_and_verify_svnrdump_dump,
  run_and_verify_svnrdump_load): Split run_and_verify_svnrdump into
  two different functions for dumping and loading. The load
  counterpart directly wraps main.svnrdump_binary in

* subversion/tests/cmdline/svnrdump_tests.py

  (run_test, run_dump_test, run_load_test): Split run_test into
  run_dump_test and run_load_test, and remove run_test itself.

  (run_dump_test): Call run_and_verify_svnrdump_dump as opposed to
  (run_load_test): Enable revprop changes on the repository, and run
  run_and_verify_svnrdump_load. Also set the UUID of the repository to
  the UUID specified in the dumpfile so that the outputs don't diverge

  (basic_svnrdump, basic_dump): Rename the test to reflect the fact
  that we also have load tests now.

  (revision_0, revision_0_dump, revision_0_load): Remove the
  revision_0 test to create two specialized versions of the test for
  dumping and loading revision 0.

  (skeleton_load): Add a new test to use the new dumpfile

  (copy_and_modify): Call run_dump_test instead of the now
  non-existant run_test.

  (test_list): Add the fresh tests. basic_svndump, revision_0_dump and
  revision_0_load should pass while skeleton_load and copy_and_modify
  should fail because of work-in-progress.

r981074 | artagnon | 2010-07-31 11:36:57 -0500 (Sat, 31 Jul 2010)

* subversion/svnrdump/load_editor.c
  (commit_callback): Don't print wrong progress information. Instead,
  use a simple progress indicator that's useful for checking in tests.
  (close_revision): Print a simple progress message for revision 0 for
  checking in tests.

r981039 | artagnon | 2010-07-31 07:00:21 -0500 (Sat, 31 Jul 2010)

svnrdump: Restructure workflow to include revprops and handle r0

Revprops are set at the time of creation of the commit_editor;
therefore, every revision needs a corresponding
commit_editor. Revprops are known only while parsing the dumpfile, so
creating the commit_editor in advance is a mistake -- we must create
it immediately after the revprops have been parsed in. Also, by virtue
of the commit_editor being unable to rewrite any revisions, it cannot
handle revision 0.

Memory management has also changed due to the "one commit_editor per
revision" design- within one revision, all allocations are done in a
revision-specific pool in the parser_baton.

* subversion/svnrdump/dumpfile_parser.c: Remove file and move all the
  code out into load_editor.c.

* subversion/svnrdump/load_editor.c

  (build_dumpfile_parser, get_dumpstream_loader): Cosmetic
  rename. Change API to accept a session instead of editor/
  edit_baton. The editor/ edit_baton is created in new_node_record
  now. Add the code for setting up the parser and parse_baton.

  (drive_load_editor, get_load_editor): Remove both functions: There
  is no more load editor- just a dumpstream loader to be driven.

  (drive_dumpstream_loader): New function to simply call
  svn_repos_parse_dumpstream2 now.

  (new_revision_record): Don't open_root here since we don't have a
  commit_editor yet. Allocate memory to the revision-specific pool in
  the parser_baton pool and set the commit_editor/ commit_edit_baton
  to NULL.

  (uuid_record): Set the uuid field in parse_baton. Currenly unused.

  (new_node_record): If the commit_editor doesn't already exist, it
  means that this is the first node in the revision: take this
  opportunity to create the commit editor and call set_target_revision
  and open_root. Note that this commit editor will be used for all
  nodes in this revision. Also change the if-statement into a
  switch-case for the action, just like in the dumpfile_parser.

  (set_revision_property): Implement special handling for revision 0
  and stuff the datestamp into the parse_baton to use in

  (set_node_property, delete_node_property, remove_node_props,
  set_fulltext, apply_textdelta, close_node): Import the relevant code
  from dumpfile_parser.c making minor semantic modifications where

  (close_revision): For revision 0, don't attempt to close a
  non-existant commit_editor; since revision 0 doesn't have any nodes,
  new_node_record is never fired and consequently, a commit_editor is
  never created. Also implement special handling for the datestamp
  after closing the revision (learnt from svnadmin).

* subversion/svnrdump/load_editor.h

  (build_dumpfile_parser, get_dumpstream_loader): Track rename.

  (drive_load_editor, get_load_editor): Track removal.

  (drive_dumpstream_loader): Track new function creation.

  (revision_baton): Add a revprop_table to store the revprops before
  writing them.

  (parse_baton): Add session and uuid. Session is needed to make RA
  API calls outside the operation of the commit editor, and uuid is
  currently just set appropriately, not used anywhere.

* subversion/svnrdump/svnrdump.c

  (load_revision): Track API changes.

r980910 | artagnon | 2010-07-30 13:23:52 -0500 (Fri, 30 Jul 2010)

* subversion/svnrdump/dumpfile_parser.c
  (new_node_record, apply_textdelta, close_node, close_revision): Wrap
  all the calls to commit_editor callback functions in SVN_ERR.

r980889 | artagnon | 2010-07-30 12:05:37 -0500 (Fri, 30 Jul 2010)

svnrdump: Add a buggy proof-of-concept load implementation. Currently
loads a few revisions with the wrong revprops.

* subversion/svnrdump/dumpfile_parser.c

  (new_revision_record): Write in the logic for handing a new revision
  record. Parse the headers and set the directory baton using

  (new_node_record): Write in the logic for parsing the headers into
  the action field of the node_baton. Then, depending on the
  Node-action header, call the right commit_editor function.

  (apply_window): Remove both versions of the function in favor of
  calling the corresponding function in the commit_editor from

  (apply_textdelta): Set the handler/ handler baton using the
  corresponding callback in commit_editor. Remove references to the
  baton we used to have for applying a textdelta.

  (close_node, close_revision): Call the corresponding callback in

  (build_dumpfile_parser): Change API to accept the commit editor and
  commit editor baton; these are central to the functionality in the
  callback functions. Remove references to apply_baton; stuff the
  commit_editor and commit_edit_baton in the parse_baton instead.

* subversion/svnrdump/load_editor.c

  (drive_load_editor): Change the API to omit operation- all
  operations are handled within the callback functions. Track the
  changed API of build_dumpfile_parser.

  (get_load_editor): Change the API to omit operation. Instead of
  hardcoding the latest revision, use the Revision-number header in
  the dumpfile later.

* subversion/svnrdump/load_editor.h

  (apply_baton, operation, commit_dir_baton): Remove structures.

  (parse_baton): Modify to include commit_editor/ commit_edit_baton
  instead of source/ target.

  (node_baton): Add action and file baton; remove pool.

  (revision_baton): Strip down to use only the necessary fields and
  add a directory baton.

  (build_dumpfile_parser, drive_load_editor, get_load_editor): Track
  API changes and update documentation.

* subversion/svnrdump/svnrdump.c

  (load_revisions): Track API changes.

r980547 | artagnon | 2010-07-29 14:30:39 -0500 (Thu, 29 Jul 2010)

svnrdump: Redesign the API and workflow to use for loading

Get a generalized commit editor along with related data, and then
drive it with using the callback parser functions that get fired while
parsing the diff using svn_repos_parse_dumpstream.

* subversion/svnrdump/dumpfile_parser.c

  (new_revision_record, uuid_record, new_node_record,
  set_revision_property, set_node_property, delete_node_property,
  remove_node_props, set_fulltext, apply_textdelta, close_node,
  close_revision): Add new no-op functions to set in the

  (new_revision_record, new_node_record): Add a small debugging aid:
  when these functions are called, print a message to stderr to
  indicate parsing progress.

  (apply_txdelta): Do just enough to perform like a no-op without
  crashing: set the handler/ handler_baton,

  (apply_window): Add some WIP code inside an #if 0 block and another
  no-op one outside. This is used by apply_textdelta to set the

  (build_dumpfile_parser): Fill in information about the new callback
  functions into the svn_repos_parse_fns2_t. Do some memory
  allocations for various batons. This is still a heavy WIP, as most
  of the information in the batons isn't used. Also, don't actually
  call svn_repos_parse_dumpstream2; this function only builds the
  parser to use. Related to this, change the API to exclude the stream

* subversion/svnrdump/load_editor.c

  (drive_load_editor): Change API to take the editor/ edit_baton (to
  be fetched from get_load_editor) and stream to use with the
  dumpstream parser. Also add calls to build_dumpfile_parser and
  svn_repos_parse_dumpstream2 appropriately.

  (get_load_editor): Change the API to remove stream. The commit
  editor needs to know nothing about the stream from which the
  dumpfile will be parsed. Setup necessary batons and do the
  appropriate memory allocations to actually make a successful call to
  svn_ra_get_commit_editor3. Set the various arguments to return

* subversion/svnrdump/load_editor.h

  (apply_baton): New baton to be used by txdelta applier.

  (parse_baton): New baton to be used by some of the parse functions,
  mainly to fetch data to put into other more specific batons.

  (node_baton, revision_baton): Two new batons to be used by various
  parse functions.

  (commit_dir_baton): The directory baton to be used by the load
  editor; taken from commit.c. ### It looks very similar to the
  directory baton we use in dump_editor: can we use the same baton?

  (build_dumpfile_parser, drive_load_editor, get_load_editor): Track
  API changes.

* subversion/svnrdump/svnrdump.c

  (load_revisions): Track the API and workflow changes.

r980179 | artagnon | 2010-07-28 14:35:31 -0500 (Wed, 28 Jul 2010)

svnrdump: Add a wireframe structure to parse a dumpstream and build a
commit editor.

* subversion/svnrdump/dumpfile_parser.c

  (build_dumpfile_parser): Build and return a dumpfile parser to parse
  the dumpfile stream in stream using
  svn_repos_parse_dumpstream2(). Currently, it's a no-op and returns
  the error 'svnrdump: Unsupported dumpfile version: 3' because no
  real callbacks have been set up.

* subversion/svnrdump/load_editor.c

  (drive_load_editor): Write a no-op to drive the load editor `editor`
  using an abstract operation represented as a `struct operation` to
  commit to session `session`.

  (get_load_editor): Change API to return `root_operation` and take a
  `stream` to parse using the dumpfile parser. Fill in the function to
  do some memory allocation and call build_dumpfile_parser(),
  svn_ra_get_commit_editor3() and open_root() of the
  svn_delta_editor_t editor.

  (commit_callback): Write a new function to print progress everytime
  a commit is made. The callback is set by get_load_editor() in its
  call to svn_ra_get_commit_editor3().

* subversion/svnrdump/load_editor.h

  (operation): Write a new structure to represent an abstract
  operation to commit. Currently, it's a reduced version of the
  corresponding struct in svnmucc. Also write a doxygen-friendly

  (build_dumpfile_parser): Expose the function so that functions in
  load_editor.c can see it in dumpfile_parser.c. Not intended to
  become a public API. Also write a doxygen-friendly description.

  (get_load_editor): Track the API changes. Update the documentation

* subversion/svnrdump/svnrdump.c

  (load_revisions): Track the API changes made to load_editor and
  additionally call drive_load_editor.

r979975 | artagnon | 2010-07-28 02:41:21 -0500 (Wed, 28 Jul 2010)

Followup r979295 to handle the expected_is_regexp case in

* subversion/tests/cmdline/svntest/verify.py
  (display_lines): When expected is a string and not a list (in the
  expected_in_regexp case), put it in a one-member list, and don't
  output a diff.

Found by: rhuijben

r979974 | artagnon | 2010-07-28 02:35:45 -0500 (Wed, 28 Jul 2010)

svnrdump: Add new copy-and-modify test.

* subversion/tests/cmdline/svnrdump_tests_data/copy-and-modify.dump:
  Add a new testdata to be used by the copy_and_modify test in
  svnrdump. Taken originally from svnsync_test_data/ and converted to
  dumpfile v3 format.

* subversion/tests/cmdline/svnrdump_tests_data/revision0.dump:
  Cosmetically rename revision0.dump to revision-0.dump.

* subversion/tests/cmdline/svnrdump_tests_data/revision-0.dump: Add.

* subversion/tests/cmdline/svnrdump_tests.py
  (revision0, revision_0): Cosmetically rename the revision 0 test.
  (copy_and_modify): Import a new test from svnsync. It is expected to
  fail due to mismatch in the headers produced by svnrdump and
  (test_list): Add copy_and_modify to the list of tests to be run,
  carefully noting that it is expected to fail.

r979710 | artagnon | 2010-07-27 09:08:51 -0500 (Tue, 27 Jul 2010)

* subversion/tests/cmdline/svntest/verify.py
  (display_lines): Improve diff output by displaying `message` along
  with the header.

Suggested by: danielsh
Approved by: rhuijben

r979395 | artagnon | 2010-07-26 13:14:28 -0500 (Mon, 26 Jul 2010)

Followup r979390 to revert stray changes.

* subversion/tests/cmdline/svnrdump_tests.py
  (revision_0, revision0): Revert stray rename.
  (copy_and_modify, copy_from_previous_version_and_modify): Remove
  stray tests.
  (test_list): Remove stray test functions and rename revision_0 back
  to revision0.

r979390 | artagnon | 2010-07-26 13:03:20 -0500 (Mon, 26 Jul 2010)

* subversion/tests/cmdline/svntest/actions.py
  (run_and_verify_svnrdump): Make it more extensible by adding extra
  arguments to check expected vales. Design it like

* subversion/tests/cmdline/svnrdump_tests.py
  (run_test, basic_svnrdump): Track the above change.
  [Accidentally add some stray changes. Reverted in r979395.]

Suggested by: rhuijben
Approved by: rhuijben

r979295 | artagnon | 2010-07-26 09:11:52 -0500 (Mon, 26 Jul 2010)

* subversion/tests/cmdline/svntest/verify.py
  (display_lines): Additionally print unified diff output using Python

Approved by: stsp

r979282 | artagnon | 2010-07-26 08:55:25 -0500 (Mon, 26 Jul 2010)

svnrdump: Add an a no-op load editor

* subversion/svnrdump/svnrdump.c
  (load_revisions): New function to fetch and drive the load
  editor. Currently just fetches the load editor.
  (load_cmd): Call load_revisions with the appropriate arguments.

* subversion/svnrdump/load_editor.c
  (get_load_editor): Add a no-op load editor.

* subversion/svnrdump/load_editor.h
  (get_load_editor): Expose the function through the header.

* subversion/svnrdump/dump_editor.c: Update description; it's no more
  the only editor used by svnrdump.

* subversion/svnrdump/dump_editor.h: Update description; it's no more
  the only editor used by svnrdump.

r979261 | artagnon | 2010-07-26 07:34:21 -0500 (Mon, 26 Jul 2010)

branches/svnrload: Delete branch and continue developing svnrload as a
subcommand to svnrdump in trunk.

Suggested by: rhuijben

r979254 | artagnon | 2010-07-26 07:10:02 -0500 (Mon, 26 Jul 2010)

* subversion/tests/cmdline/svntest/actions.py
  (run_and_verify_svnrdump): Add new function to run svnrdump with
  '-q', verify that stderr is empty, and return the output on stdout.

* subversion/tests/cmdline/svnrdump_tests.py
  (run_test, basic_svnrdump): Factor out run_svnrdump in favor of

Suggested by: danielsh
Approved by: rhuijben

r979094 | artagnon | 2010-07-25 14:21:02 -0500 (Sun, 25 Jul 2010)

svnrdump: Add support for subcommands

* subversion/svnrdump/svnrdump.c

  (svnrdump__cmd_table): A table of subcommands along with related

  (opt_baton_t): New struct for storing options to pass around and
  dispatching subcommands.

  (help, help_cmd): Replace the help function with a new help_cmd
  function, effectively making "help" a subcommand.
  (replay_range, replay_revisions): Rename function.

  (dump_cmd, load_cmd): New functions to extract arguments from the
  apr_getopt_t and opt_baton and dispatch calls to the corresponding
  functions that do the real work. dump_cmd eventually calls
  replay_revisions, while load_cmd is currently a noop.

  (main): Replace local variables with fields in opt_baton where
  appropriate. Add logic for reading and dispatching a
  subcommand. Track changes made to other functions.

r979011 | artagnon | 2010-07-25 04:20:55 -0500 (Sun, 25 Jul 2010)

Add a build.conf and get svnrload to build

* build.conf
  (svnrdump): Add new section to build svnrdump.
  (__ALL__): Add svnrdump.
* subversion/svnrload
  (svn:ignore): Copy properties from svnrdump.
* subversion/svnrload/load_editor.c: Change the path to the load
* subversion/svnrload/parse_dumpstream.c
  Correct ident to match GNU style
  (main): Stub out the callbacks and use the default parser. Also wrap
  functions in SVN_INT_ERR appropriately for error handling.
* subversion/svnrload/svnrload.c
  (main): Stub out function completely in favor of the main in

r979002 | artagnon | 2010-07-25 03:44:21 -0500 (Sun, 25 Jul 2010)

Add svnrload: currently a heavy WIP, with most of the code imported
from svnrdump

* subversion/svnrload
* subversion/svnrload/load_editor.c: From svnrdump/dump_editor.c
* subversion/svnrload/svnrload.c: From svnrdump/svnrdump.c
* subversion/svnrload/load_editor.h: From svnrdump/dump_editor.h
* subversion/svnrload/parse_dumpstream.c: Functionality to parse a

r979000 | artagnon | 2010-07-25 03:29:09 -0500 (Sun, 25 Jul 2010)

* branches/svnrload: Add a new branch for svnrload: a tool to do the
  inverse of svnrdump.

r978852 | artagnon | 2010-07-24 06:42:01 -0500 (Sat, 24 Jul 2010)

* subversion/tests/cmdline/svnrdump_tests.py (run_test): Run svnrdump
  with '-q' and check that nothing is printed to stderr.

Review by: danielsh
Approved by: danielsh

r978841 | artagnon | 2010-07-24 05:18:58 -0500 (Sat, 24 Jul 2010)

svnrdump: Add a regression test which verifies that revision 0 of a
repository is dumped correctly. Revision 0 only has revision
properties, so it's somewhat special.

* subversion/tests/cmdline/svnrdump_tests_data: A new directory to
  keep test data for svnrdump.
* subversion/tests/cmdline/svnrdump_tests_data/revision0.dump: A dump
  of revision zero of the ASF repository as of late July 2010. Used as
  test data in the revision0 test.
* subversion/tests/cmdline/svnrdump_tests.py:
  (build_repos, run_test): The new helper functions.
  (revision0): The new test.
  (test_list): Run the new test.

Review by: danielsh
Approved by: danielsh

r967159 | artagnon | 2010-07-23 11:36:29 -0500 (Fri, 23 Jul 2010)

* subversion/svnrdump/svnrdump.c (replay_range): Followup r967157 to
  move propstring and propstream variables into the if block.

r967157 | artagnon | 2010-07-23 11:29:38 -0500 (Fri, 23 Jul 2010)

* subversion/svnrdump/svnrdump.c
  (main): Improve error message and remove newline, usage information
  from error messages.
  (replay_revstart): Wrap svn_stream_close in SVN_ERR.
  (replay_range): Rename encoded_prophash prophash moving its
  declaration inside the if block, wrap svn_stream_close in SVN_ERR,
  and cleanup a minor style inconsistency.

r967149 | artagnon | 2010-07-23 11:04:52 -0500 (Fri, 23 Jul 2010)

* subversion/svnrdump/dump_editor.c
  (dump_edit_baton): Add new base_checksum field.
  (apply_textdelta): Set the base_checksum field in the editor baton.
  (close_file): Print the Text-delta-base-md5 header.

r967075 | artagnon | 2010-07-23 07:40:19 -0500 (Fri, 23 Jul 2010)

* subversion/svnrdump/svnrdump.c: Don't invent additional svn:sync-*

r967056 | artagnon | 2010-07-23 06:56:49 -0500 (Fri, 23 Jul 2010)

subversion/svnrdump: Fix dump to match the newlines in the dump
produced by `svnadmin dump`. Functions touched:
* subversion/svnrdump/svnrdump.c (replay_revstart, replay_range)
* subversion/svnrdump/dump_editor.c (dump_props)

r967046 | artagnon | 2010-07-23 06:16:02 -0500 (Fri, 23 Jul 2010)

* subversion/svnrdump/svnrdump.c
  (main): Error out if LOWER is greater than UPPER.
  (help): Fix spaces in usage string.

r967040 | artagnon | 2010-07-23 05:57:17 -0500 (Fri, 23 Jul 2010)

* subversion/svnrdump/svnrdump.c (replay_range): Remove
  svn:sync-from-url and svn:sync-from-uuid, add real properties, and
  report that revision 0 was dumped.

r966851 | artagnon | 2010-07-22 15:43:38 -0500 (Thu, 22 Jul 2010)

* subversion/svnrdump/svnrdump.c (main): Error out if UPPER refers to
  a non-existent revision.

r966841 | artagnon | 2010-07-22 15:18:16 -0500 (Thu, 22 Jul 2010)

* subversion/svnrdump/svnrdump.c
  (replay_range): Dump revision 0 separately since the replay API
  doesn't feature it. svn:date is still a TODO.
  (main): Change the default LOWER to 0.
  (help): Update the usage string to reflect this new default LOWER.

r966790 | artagnon | 2010-07-22 13:35:41 -0500 (Thu, 22 Jul 2010)

* tools/dev/unix-build/README: Mention the "nuke" target.

Approved by: stsp

r966784 | artagnon | 2010-07-22 13:27:32 -0500 (Thu, 22 Jul 2010)

* tools/dev/unix-build/README: Document Makefile.svn
* tools/dev/unix-build/Makefile.svn: Remove large documentation
  header so people use README instead.

Approved by: stsp

r966723 | artagnon | 2010-07-22 11:13:02 -0500 (Thu, 22 Jul 2010)

subversion/svnrdump: Fix indentation and whitespace to match GNU
style. Files touched:
* subversion/svnrdump/svnrdump.c
* subversion/svnrdump/dump_editor.h
* subversion/svnrdump/dump_editor.c

r966654 | artagnon | 2010-07-22 08:40:59 -0500 (Thu, 22 Jul 2010)

* subversion/svnrdump/dump_editor.c (open_root): Followup r966649 to
  fix indentation with spaces, not tabs.

r966649 | artagnon | 2010-07-22 08:37:19 -0500 (Thu, 22 Jul 2010)

* subversion/svnrdump/dump_editor.c (open_root): Fix indentation.

r966358 | artagnon | 2010-07-21 13:55:29 -0500 (Wed, 21 Jul 2010)

svnrdump: Restructure code and cleanup comments.

Cleanup comments in:
* subversion/svnrdump/svnrdump.c
* subversion/svnrdump/svnrdump.h
* subversion/svnrdump/util.c
* subversion/svnrdump/dump_editor.c
* subversion/svnrdump/dump_editor.h

Refactor code in:

* subversion/svnrdump/dump_editor.h (edit_baton): Remove is_copy.
* subversion/svnrdump/dump_editor.c: Track removing is_copy from the
  edit baton. Make it a local variable where necessary.

* subversion/svnrdump/util.c (write_hash_to_stringbuf): Collapse two
  loops into one.

r965498 | artagnon | 2010-07-19 09:29:50 -0500 (Mon, 19 Jul 2010)

* subversion/svnrdump/dump_editor.h (dir_baton): Remove unused pool.
* subversion/svnrdump/dump_editor.c
  (make_dir_baton, delete_entry): Track removed pool in directory

r965495 | artagnon | 2010-07-19 09:26:43 -0500 (Mon, 19 Jul 2010)

Obvious fix.

* build.conf (svnrdump): Fix typo.

Approved by: ehu

r965492 | artagnon | 2010-07-19 09:11:58 -0500 (Mon, 19 Jul 2010)

Add some Doxygen-friendly documentation to the files in
subversion/svnrdump. Files touched:
* subversion/svnrdump/dump_editor.h
* subversion/svnrdump/dump_editor.c
* subversion/svnrdump/util.c
* subversion/svnrdump/svnrdump.c
* subversion/svnrdump/svnrdump.h

r965466 | artagnon | 2010-07-19 08:05:01 -0500 (Mon, 19 Jul 2010)

* subversion/svnrdump (svn:ignore): Copy the svn:ignore from

r965464 | artagnon | 2010-07-19 07:57:59 -0500 (Mon, 19 Jul 2010)

* build.conf (__ALL__): Add svnrdump

Approved by: Bert

r965427 | artagnon | 2010-07-19 06:11:55 -0500 (Mon, 19 Jul 2010)

* subversion/svrdump (svn:ignore): Ignore 'svnrdump'.

r965418 | artagnon | 2010-07-19 05:26:46 -0500 (Mon, 19 Jul 2010)

* subversion/svnrdump/svnrdump.c
  (main, replay_range, open_connection): Avoid using global variables;
  put them in the function arguments instead.
* subversion/svnrdump/svnrdump.c (replay_baton): Add a new
  svn_boolean_t field to indicate verbosity.

r965301 | artagnon | 2010-07-18 17:27:11 -0500 (Sun, 18 Jul 2010)

* subversion/svnrdump/dump_editor.h
  (dump_edit_baton): Remove unused variable changed_path.
* subversion/svnrdump/dump_editor.c
  (add_file, open_file): Track removed variable.

r965296 | artagnon | 2010-07-18 16:27:16 -0500 (Sun, 18 Jul 2010)

* tools/dev/unix-build/Makefile.svn: Fix a couple of links to the
  iconv release tarballs.

Approved by: danielsh

r965294 | artagnon | 2010-07-18 16:19:23 -0500 (Sun, 18 Jul 2010)

* subversion/svnrdump/svnrdump.c (usage): Mark usage string for

r965125 | artagnon | 2010-07-17 13:47:49 -0500 (Sat, 17 Jul 2010)

Initial checkin of svnrdump

svnrdump is a tool that produces a dumpfile v3 without filesystem
backing by playing back the Subversion repository through the replay
API. It can be used with remote repositories as well as local
repositories over the file:// protocol.

Approved by: stsp

r965115 | artagnon | 2010-07-17 13:00:21 -0500 (Sat, 17 Jul 2010)

* COMMITTERS: Add artagnon as a partial committer.