On Wed, 18 Oct 2006, Kamesh Jayachandran wrote:
...
> 'Merge' on a subtree working copy should elide for the mergeinfo
> through 'ra' layers.
The term "elide" is meant to indicate removal. So, we're retrieving
merge info which may've already been elided here (by the FS), rather
than "elid[ing] for the merge info" (which is non-sensical).
...
> Index: subversion/libsvn_client/diff.c
> ===================================================================
> --- subversion/libsvn_client/diff.c (revision 21996)
> +++ subversion/libsvn_client/diff.c (working copy)
...
> @@ -1851,12 +1854,28 @@
> SVN_ERR(parse_merge_info(target_mergeinfo, *entry, target_wcpath,
> adm_access, ctx, pool));
> if (repos_mergeinfo != NULL)
> - /* ### FIXME: Pre-existing WC-local changes may've reverted some
> - ### of the merge info on WC_TARGET. How should we combine
> - ### these sets of merge info (e.g. give precedence to the WC if
> - ### it has merge info set)? */
> - SVN_ERR(svn_mergeinfo_merge(target_mergeinfo, repos_mergeinfo,
> - *target_mergeinfo, pool));
> + {
> + const char *mergeinfo_path_name;
> + apr_hash_t *mergeinfo_for_path;
> + for (hi = apr_hash_first(pool, repos_mergeinfo);
> + hi; hi = apr_hash_next(hi))
> + {
> + const void *key;
> + void *val;
> +
> + apr_hash_this(hi, &key, NULL, &val);
> +
> + mergeinfo_path_name = key;
> + mergeinfo_for_path = val;
> + /* ### FIXME: Pre-existing WC-local changes may've reverted some
> + ### of the merge info on WC_TARGET. How should we combine
> + ### these sets of merge info (e.g. give precedence to the WC if
> + ### it has merge info set)? */
> + SVN_ERR(svn_mergeinfo_merge(target_mergeinfo, mergeinfo_for_path,
> + *target_mergeinfo, pool));
> + }
> + }
> +
> return SVN_NO_ERROR;
> }
While this patch is fully functional, it could also be cleaned up a
lot. I tighted up the variable usage, removed this unnecessary hash
iteration, and included support for targets which had been
copied/moved. I've committed these changes as r22057.
- Dan
- application/pgp-signature attachment: stored
Received on Fri Oct 20 21:54:07 2006