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

[merge tracking] Merge tests #12 and #17

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-09-22 19:09:34 CEST

On Fri, 22 Sep 2006, Kamesh Jayachandran wrote:
...
> In case of three way merge handle the fact that a svn_merge_range_t's
> "start" and "end" are inclusive.
>
> * subversion/libsvn_client/diff.c
> (grok_range_info_from_opt_revisions):
> In case of three way merge handle the fact that a svn_merge_range_t's
> "start" and "end" are inclusive.

I committed this change in r21605 to get another test passing, but I
have doubts about this approach being a permanent solution.

This leaves only 3 merge tests failing on the merge-tracking branch!

Yesterday, I made some great progress with test 17. I traced the
problem to the following call stack:

 svn_wc_adm_retrieve (libsvn_wc/lock.c:962)
 walker_helper (libsvn_wc/entries.c)
 svn_wc_walk_entries2 (libsvn_wc/entries.c)
 svn_client__get_prop_from_wc (libsvn_client/prop_commands.c)
 parse_merge_info (libsvn_client/diff.c)
 get_wc_target_merge_info (libsvn_client/diff.c)

The problem is that a WC directory *underneath* the directory which is
the target of the merge is missing from the WC. As
svn_wc_walk_entries2() is strolling through the WC to retrieve the
value for the "svn:mergeinfo" property from each sub-path, it attempts
to access the .svn area of a directory which doesn't exist:

From walker_helper():

      if (current_entry->kind == svn_node_dir)
        {
          svn_wc_adm_access_t *entry_access;
          SVN_ERR(svn_wc_adm_retrieve(&entry_access, adm_access, entrypath,
                                      subpool));
From svn_wc_adm_retrieve():

      if (kind == svn_node_none)
        return svn_error_createf(SVN_ERR_WC_NOT_LOCKED, NULL,
                                 _("Directory '%s' is missing"),
                                 svn_path_local_style(path, pool));

walker_helper()'s attempt to retrieve the svn_wc_adm_access_t for the
sub-directory without a svn_io_check_path() call might be a reasonable
optimization. However, because of the generic SVN_ERR_WC_NOT_LOCKED
error thrown by svn_wc_adm_retrieve(), there doesn't seem to be way
for walker_helper() to determine that the directory is missing (at
least, not without subsequently resorting to the path check). David
James and I were thinking that this scenario should result in an error
with a different code (e.g. SVN_ERR_WC_PATH_MISSING or something),
which could be detected further up the call stack.

While this seems like a fairly reasonable approach, I'm not clear what
other implications it might have for walker_helper(). Any advice
welcome...

- Dan

  • application/pgp-signature attachment: stored
Received on Fri Sep 22 19:09:25 2006

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.