There currently a bunch of different names for merge info hashes
floating around (e.g. mergeinfo, minfohash, minfo, etc.). I'm not
always sure when to use which -- my favorite is "mergeinfo", but I
wonder whether it's always used to describe the same thing?
This would be a good spot to put some sort of naming convention into
use to distinguish between different types of merge info, or to choose
a single name and go with it.
- Dan
On Mon, 17 Jul 2006, dlr@tigris.org wrote:
> Author: dlr
> Date: Mon Jul 17 14:36:16 2006
> New Revision: 20712
>
> Modified:
> branches/merge-tracking/subversion/include/svn_fs.h
> branches/merge-tracking/subversion/libsvn_fs/fs-loader.c
> branches/merge-tracking/subversion/libsvn_fs/fs-loader.h
> branches/merge-tracking/subversion/libsvn_fs_fs/tree.c
>
> Log:
> On the merge-tracking branch: Clarify API contract for FS merge info
> retrieval. Make output parameter positioning consistent with
> Subversion's idioms.
>
> * subversion/include/svn_fs.h
> (svn_fs_get_merge_info): Move the MINFOHASH output parameter to
> first in the argument list. Document that it is set to an empty
> hash when there is no merge info available for PATHS.
>
> * subversion/libsvn_fs/fs-loader.h
> * subversion/libsvn_fs/fs-loader.c
> (root_vtable_t.get_merge_info): Rename the INFO parameter to
> MINFOHASH (to match svn_fs_get_merge_info()), and move it to first
> in the argument list. Update implementation accordingly.
>
> * subversion/libsvn_fs_fs/tree.c
> (fs_get_merge_info): Move MERGEINFO output parameter to first in the
> argument list.
>
>
> Modified: branches/merge-tracking/subversion/include/svn_fs.h
> URL: http://svn.collab.net/viewvc/svn/branches/merge-tracking/subversion/include/svn_fs.h?pathrev=20712&r1=20711&r2=20712
> ==============================================================================
> --- branches/merge-tracking/subversion/include/svn_fs.h (original)
> +++ branches/merge-tracking/subversion/include/svn_fs.h Mon Jul 17 14:36:16 2006
> @@ -1143,23 +1143,23 @@
> apr_hash_t *mergeinhash,
> apr_pool_t *pool);
>
> -/** Retrieve multiple nodes merge info
> +/** Retrieve merge info for multiple nodes.
> + *
> + * @a minfohash is filled with merge info for each of the @a paths,
> + * stored as a string. It will never be @c NULL, but may be empty.
> *
> * @a root indicates the revision root to use when looking up paths.
> *
> * @a paths indicate the paths you are requesting information for
> *
> - * @a minfohash is filled with merge info for each of the @a paths,
> - * stored as a string.
> - *
> * When @a include_parents is @c TRUE, include inherited merge info
> * from parent directories of @a paths.
> *
> * Do any necessary temporary allocation in @a pool.
> */
> -svn_error_t *svn_fs_get_merge_info(svn_fs_root_t *root,
> +svn_error_t *svn_fs_get_merge_info(apr_hash_t **minfohash,
> + svn_fs_root_t *root,
> const apr_array_header_t *paths,
> - apr_hash_t **minfohash,
> svn_boolean_t include_parents,
> apr_pool_t *pool);
>
>
> Modified: branches/merge-tracking/subversion/libsvn_fs/fs-loader.c
> URL: http://svn.collab.net/viewvc/svn/branches/merge-tracking/subversion/libsvn_fs/fs-loader.c?pathrev=20712&r1=20711&r2=20712
> ==============================================================================
> --- branches/merge-tracking/subversion/libsvn_fs/fs-loader.c (original)
> +++ branches/merge-tracking/subversion/libsvn_fs/fs-loader.c Mon Jul 17 14:36:16 2006
> @@ -728,13 +728,13 @@
> }
>
> svn_error_t *
> -svn_fs_get_merge_info(svn_fs_root_t *root,
> +svn_fs_get_merge_info(apr_hash_t **minfohash,
> + svn_fs_root_t *root,
> const apr_array_header_t *paths,
> - apr_hash_t **info,
> svn_boolean_t include_parents,
> apr_pool_t *pool)
> {
> - return root->vtable->get_merge_info(root, paths, info, include_parents,
> + return root->vtable->get_merge_info(minfohash, root, paths, include_parents,
> pool);
> }
>
>
> Modified: branches/merge-tracking/subversion/libsvn_fs/fs-loader.h
> URL: http://svn.collab.net/viewvc/svn/branches/merge-tracking/subversion/libsvn_fs/fs-loader.h?pathrev=20712&r1=20711&r2=20712
> ==============================================================================
> --- branches/merge-tracking/subversion/libsvn_fs/fs-loader.h (original)
> +++ branches/merge-tracking/subversion/libsvn_fs/fs-loader.h Mon Jul 17 14:36:16 2006
> @@ -291,9 +291,9 @@
> svn_error_t *(*change_merge_info)(svn_fs_root_t *root, const char *path,
> apr_hash_t *info,
> apr_pool_t *pool);
> - svn_error_t *(*get_merge_info)(svn_fs_root_t *root,
> + svn_error_t *(*get_merge_info)(apr_hash_t **minfohash,
> + svn_fs_root_t *root,
> const apr_array_header_t *paths,
> - apr_hash_t **info,
> svn_boolean_t include_parents,
> apr_pool_t *pool);
> } root_vtable_t;
>
> Modified: branches/merge-tracking/subversion/libsvn_fs_fs/tree.c
> URL: http://svn.collab.net/viewvc/svn/branches/merge-tracking/subversion/libsvn_fs_fs/tree.c?pathrev=20712&r1=20711&r2=20712
> ==============================================================================
> --- branches/merge-tracking/subversion/libsvn_fs_fs/tree.c (original)
> +++ branches/merge-tracking/subversion/libsvn_fs_fs/tree.c Mon Jul 17 14:36:16 2006
> @@ -1328,9 +1328,9 @@
>
> /* Get the merge info for a set of paths. */
> static svn_error_t *
> -fs_get_merge_info(svn_fs_root_t *root,
> +fs_get_merge_info(apr_hash_t **mergeinfo,
> + svn_fs_root_t *root,
> const apr_array_header_t *paths,
> - apr_hash_t **mergeinfo,
> svn_boolean_t include_parents,
> apr_pool_t *pool)
> {
- application/pgp-signature attachment: stored
Received on Tue Jul 18 00:06:12 2006