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

Re: Merging the issue-3067-deleted-subtrees branch back to trunk

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 29 Oct 2008 19:26:54 +0000

On Mon, 2008-10-27 at 14:21 -0400, Paul Burba wrote:
> The issue-3067-deleted-subtrees branch addresses all outstanding issue
> in the reopened issue #3067:

Yee-har! That's great, Paul.

> If anyone has some time to look at this branch I'd appreciate it.

If not the whole branch, ...

> This branch implements a new RA interface svn_ra_get_revision_deleted,
> so even if you are not very familiar with the merge tracking code, if
> you know your way around ra_serf/ra_neon it would be great if you
> could glance at r33523 and/or r33562, the changes which implement the
> ra-neon and ra-serf versions of the get-deleted-rev RA API
> respectively.

... then this new get-deleted-rev RA API would be good to look at. To
make this easier for review-by-email, I'm attaching a log of the branch
activity, pruned to the messages that appear relevant to a reviewer of
this API now, plus a diff of the branch (against its latest catch-up
point on trunk), again pruned to what appears relevant to review of this
API (mainly, this is omitting the changes to "merge.c" which is the
(only/main?) user of this API).

- Julian

------------------------------------------------------------------------
r33851 | pburba | 2008-10-22 19:01:16 +0100 (Wed, 22 Oct 2008) | 21 lines
Changed paths:
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_client/merge.c
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra/compat.c
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra/ra_loader.c
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra/ra_loader.h

On the issue-3067-deleted-subtrees branch: Implement log based workaround
for svn_ra_get_deleted_rev() when querying a 1.5.x server.

* subversion/libsvn_client/merge.c
  (adjust_deleted_subtree_ranges): Some comment tweaks. Remove a TODO
  comment.
  (calculate_remaining_ranges): Comment tweaks.

* subversion/libsvn_ra/compat.c
  (log_path_del_rev_t, log_path_del_receiver): New baton and
  svn_log_entry_receiver_t callback for...
  (svn_ra__get_deleted_rev_from_log): ...this new fallback implementation of
  svn_ra_get_deleted_rev() using svn_ra_get_log2().

* subversion/libsvn_ra/ra_loader.c
  (svn_ra_get_deleted_rev): If get-deleted-rev isn't implemented
  on the server then use the new svn_ra__get_deleted_rev_from_log fallback.

* subversion/libsvn_ra/ra_loader.h
  (svn_ra__get_deleted_rev_from_log): New declaration.

------------------------------------------------------------------------
r33562 | pburba | 2008-10-08 23:03:56 +0100 (Wed, 08 Oct 2008) | 16 lines
Changed paths:
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_serf/get_deleted_rev.c

On the issue-3067-deleted-subtrees branch: Implement ra-serf version of the
get-deleted-rev RA API.

Several merge tests fail intermittently with this change with the error
svn: Error running context: An established connection was aborted by the
software in your host machine. Can't put my finger on what is wrong just
yet...

* subversion/libsvn_ra_serf/get_deleted_rev.c
  Include svn_ra.h, svn_xml.h, svn_path.h, and svn_private_config.h.
  (drev_state_e): New enum.
  (drev_info_t, drev_context_t): New structs.
  (push_state, start_getdrev, end_getdrev, cdata_getdrev,
  create_getdrev_body): New functions.
  (GETDREV_HEADER, GETDREV_FOOTER): New #defines.
  (svn_ra_serf__get_deleted_rev): Implement previously empty function.
------------------------------------------------------------------------
r33523 | pburba | 2008-10-07 20:44:43 +0100 (Tue, 07 Oct 2008) | 22 lines
Changed paths:
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_neon/get_deleted_rev.c
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_neon/ra_neon.h
   M /branches/issue-3067-deleted-subtrees/subversion/mod_dav_svn/dav_svn.h
   A /branches/issue-3067-deleted-subtrees/subversion/mod_dav_svn/reports/deleted-rev.c
   M /branches/issue-3067-deleted-subtrees/subversion/mod_dav_svn/version.c

On the issue-3067-deleted-subtrees branch: Implement ra-neon version of the
get-deleted-rev RA API.

* subversion/libsvn_ra_neon/get_deleted_rev.c
  Include apr_pools.h, apr_strings.h, apr_xml.h, svn_error.h, svn_pools.h,
  svn_ra.h, ../libsvn_ra/ra_loader.h, svn_path.h, svn_xml.h,
  private/svn_dav_protocol.h, and svn_private_config.h.
  (drev_report_elements, drev_baton_t, drev_start_element,
  drev_end_element): New.
  (svn_ra_neon__get_deleted_rev): Implement a formerly empty shell.

* subversion/libsvn_ra_neon/ra_neon.h
  (ELEM_deleted_rev_report): New SVN element enum.

* subversion/mod_dav_svn/dav_svn.h
  (dav_svn__reports_list): Add 'get-deleted-rev-report' to the list of
  custom Subversion reports.

* subversion/mod_dav_svn/reports/deleted-rev.c: New.

* subversion/mod_dav_svn/version.c
  (deliver_report): Add 'get-deleted-rev-report'.
------------------------------------------------------------------------
r33401 | pburba | 2008-10-02 17:24:43 +0100 (Thu, 02 Oct 2008) | 13 lines
Changed paths:
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_svn/client.c
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_svn/protocol
   M /branches/issue-3067-deleted-subtrees/subversion/svnserve/serve.c

On the issue-3067-deleted-subtrees branch: Implement ra-svn version of the
get-deleted-rev RA API.

* subversion/libsvn_ra_svn/client.c
  (ra_svn_get_deleted_rev): Implement a formerly empty shell.

* subversion/libsvn_ra_svn/protocol
  Add entry for get-deleted-rev in the main command set.

* subversion/svnserve/serve.c
  (get_deleted_rev): New.
  (main_commands): Add get-deleted-rev to supported commands.

------------------------------------------------------------------------
r33367 | pburba | 2008-09-30 23:10:46 +0100 (Tue, 30 Sep 2008) | 46 lines
Changed paths:
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_client/merge.c
   M /branches/issue-3067-deleted-subtrees/subversion/tests/cmdline/merge_tests.py

On the issue-3067-deleted-subtrees branch: Avoid spurious tree conflicts when
a subtree file needs some changes during a merge but is ultimately deleted.

As part of this fix I've reimplemented the helper function which ensures that
we don't describe non-existent subtree paths to the merge editor and thus
break the merge. I did this with the obvious goal of solving the problem
this branch was created to address,
http://subversion.tigris.org/issues/show_bug.cgi?id=3067#desc43, but this
change should also solve any analogous problems for *directory* subtrees,
when (if) that behavior is implemented. This change also goes some way to
making the subtree merge code marginally easier to understand (o.k., I
might be guilty of extreme optimism here, but I can dream).

There are still two significant TODOs left on this branch:

1) Handle the case of 1.6 clients and 1.5 servers: The latter won't have
   svn_ra_get_revision_deleted implemented and the solution in this commit
   relies on that API.

2) Implement svn_ra_get_revision_deleted() for ra_neon, ra_svn, and
   ra_serf.

* subversion/libsvn_client/merge.c
  (prepare_subtree_ranges): Rename this...
  (adjust_deleted_subtree_ranges): ...to this. Change signature to accept
  the actual svn_client__merge_path_t *child being processed, rather than
  just the child's remaining_ranges member. Remove the reference argument
  child_deleted_or_nonexistant and handle this situation entirely within
  this function.
  (filter_merged_revisions): Simplify what this function does, specifically
  stop calling prepare_subtree_ranges() and remove arguments from signature
  that were only needed for this call. Rework the doc string to reflect
  these signature changes and to better describe what this function does.
  Also, use a subpool for all but the final allocation of
  child->remaining_ranges.
  (calculate_remaining_ranges): Update call to filter_merged_revisions().
  Call adjust_deleted_subtree_ranges() directly since for subtrees, since
  filter_merged_revisions() no longer does that work.

* subversion/tests/cmdline/merge_tests.py
  (new_subtrees_should_not_break_merge,
   subtree_gets_changes_even_if_ultimately_deleted): Remove comments about
  XFail status.
  (test_list): Remove XFail from new_subtrees_should_not_break_merge and
  subtree_gets_changes_even_if_ultimately_deleted.

------------------------------------------------------------------------
r33348 | pburba | 2008-09-29 16:30:42 +0100 (Mon, 29 Sep 2008) | 40 lines
Changed paths:
   M /branches/issue-3067-deleted-subtrees/subversion/include/svn_ra.h
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra/ra_loader.c
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra/ra_loader.h
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_local/ra_plugin.c
   A /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_neon/get_rev_deleted.c
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_neon/ra_neon.h
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_neon/session.c
   A /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_serf/get_rev_deleted.c
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_serf/ra_serf.h
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_serf/serf.c
   M /branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_svn/client.c

On the issue-3067-deleted-subtrees branch add new RA interface
svn_ra_get_revision_deleted.

This change implements svn_ra_get_revision_deleted for ra_local only.
Holding off on ra_serf, ra_neon, and ra_svn implementations until I'm sure
this (branch) is going to work.

* subversion/include/svn_ra.h
* subversion/libsvn_ra/ra_loader.c
  (svn_ra_get_revision_deleted): New function.

* subversion/libsvn_ra/ra_loader.h
  (svn_ra__vtable_t): Add get_revision_deleted.

* subversion/libsvn_ra_local/ra_plugin.c
  (svn_ra_local__get_revision_deleted): New implementation.
  (ra_local_vtable): Add svn_ra_local__get_revision_deleted.

* subversion/libsvn_ra_neon/ra_neon.h
  (svn_ra_neon__get_revision_deleted): New (unimplemented) function.

* subversion/libsvn_ra_neon/get_rev_deleted.c:
  New file for svn_ra_neon__get_revision_deleted implementation.

* subversion/libsvn_ra_neon/session.c
  (neon_vtable): Add svn_ra_neon__get_revision_deleted.

* subversion/libsvn_ra_serf/ra_serf.h
  (svn_ra_serf__get_revision_deleted): New (unimplemented) function.

* subversion/libsvn_ra_serf/get_rev_deleted.c:
  New file for svn_ra_serf__get_revision_deleted implementation.

* subversion/libsvn_ra_serf/serf.c
  (serf_vtable): Add svn_ra_serf__get_revision_deleted.

* subversion/libsvn_ra_svn/client.c
  (ra_svn_get_revision_deleted): New (unimplemented) function.
  (ra_svn_vtable): Add ra_svn_get_revision_deleted.

------------------------------------------------------------------------
r33301 | pburba | 2008-09-25 20:52:12 +0100 (Thu, 25 Sep 2008) | 2 lines
Changed paths:
   A /branches/issue-3067-deleted-subtrees (from /trunk:33300)

Create new branch, "issue-3067-deleted-subtrees", to develop a fix
for http://subversion.tigris.org/issues/show_bug.cgi?id=3067#desc43.
------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-10-29 20:27:27 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.