2009-04-07 20:47:32 C. Michael Pilato napisaĆ(a):
> Author: cmpilato
> Date: Tue Apr 7 11:47:31 2009
> New Revision: 37080
>
> Log:
> On the 'issue-3390-dev' branch, began tinkering with the way externals
> are processed. Rather than harvesting only the externals property
> values in traveral_info, track also the URL of the item on which the
> property is set (so that relative URLs can later been properly
> un-relative-ized).
>
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> * *
> * This work is unfinished, and not suitable for merge back to *
> * the trunk. *
> * *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>
> * subversion/include/svn_wc.h
> (svn_wc_externals_definition_t): New opaque type.
> (svn_wc_edited_externals2, svn_wc_externals_definition_propval,
> svn_wc_externals_definition_baseurl): New functions.
> (svn_wc_edited_externals): Mark as deprecated.
>
> * subversion/libsvn_wc/wc.h
> (struct svn_wc_externals_definition_t): New type.
> (struct svn_wc_traversal_info_t): Tweak the definitions of this
> structure's 'externals_old' and 'externals_new' members.
> (svn_wc__add_traversal_info): New function.
>
> * subversion/libsvn_wc/adm_crawler.c
> (svn_wc__add_traversal_info): New helper, cored from
> report_revisions_and_depths(), but which builds traversal_info a
> little differently now, according to its new definition.
> (report_revisions_and_depths): Use svn_wc__add_traversal_info() now.
>
> * subversion/libsvn_wc/status.c
> (get_dir_status): Use svn_wc__add_traversal_info() now.
>
> * subversion/libsvn_wc/update_editor.c
> (maybe_record_externals_change): New helper function.
> (close_directory): Use maybe_record_externals_change() both when
> their was a real set of externals properties changes and when this
> is a switch operation that might have changed the way relative
> external URLs are interpreted.
> (svn_wc_edited_externals2): New function.
> (svn_wc_edited_externals): Moved to deprecated.c.
>
> * subversion/libsvn_wc/deprecated.c
> (svn_wc_edited_externals): Moved from update_editor.c, with a note
> to rework it for compatibility.
>
> * subversion/libsvn_client/client.h
> (svn_client__handle_externals): Add 'is_switch' parameter.
>
> * subversion/libsvn_client/switch.c
> (svn_client__switch_internal): Pass non-NULL traversal info to
> svn_wc_crawl_revisions4(). Update call to svn_client__handle_externals().
>
> * subversion/libsvn_client/update.c
> (svn_client__update_internal): Update call to
> svn_client__handle_externals().
>
> * subversion/libsvn_client/externals.c
> (struct handle_external_item_change_baton): Add 'new_base_url' and
> 'old_base_url' members; lose 'parent_dir_url'.
> (handle_external_item_change): Pass new base URL parameters to
> resolve_relative_external_url().
> (struct handle_externals_desc_change_baton): Note that externals
> hashes are as they come from svn_wc_edited_externals2() now. Add
> 'is_switch' member.
> (handle_externals_desc_change): Track changes to datatypes returned
> by svn_wc_edited_externals2(), and apply the old and new base URL
> information where application.
> (svn_client__handle_externals): Add 'is_switch' parameter, tossed
> into baton. Use svn_wc_edited_externals2() now.
> (svn_client__fetch_externals): Populate new 'is_switch' baton member.
> (svn_client__do_external_status): Use svn_wc_edited_externals2() now.
>
> Modified:
> branches/issue-3390-dev/subversion/include/svn_wc.h
> branches/issue-3390-dev/subversion/libsvn_client/client.h
> branches/issue-3390-dev/subversion/libsvn_client/externals.c
> branches/issue-3390-dev/subversion/libsvn_client/switch.c
> branches/issue-3390-dev/subversion/libsvn_client/update.c
> branches/issue-3390-dev/subversion/libsvn_wc/adm_crawler.c
> branches/issue-3390-dev/subversion/libsvn_wc/deprecated.c
> branches/issue-3390-dev/subversion/libsvn_wc/status.c
> branches/issue-3390-dev/subversion/libsvn_wc/update_editor.c
> branches/issue-3390-dev/subversion/libsvn_wc/wc.h
>
> Modified: branches/issue-3390-dev/subversion/include/svn_wc.h
> URL: http://svn.collab.net/viewvc/svn/branches/issue-3390-dev/subversion/include/svn_wc.h?pathrev=37080&r1=37079&r2=37080
> ==============================================================================
> --- branches/issue-3390-dev/subversion/include/svn_wc.h Tue Apr 7 11:39:30 2009 (r37079)
> +++ branches/issue-3390-dev/subversion/include/svn_wc.h Tue Apr 7 11:47:31 2009 (r37080)
> @@ -501,11 +501,34 @@ svn_wc_set_adm_dir(const char *name,
> */
> typedef struct svn_wc_traversal_info_t svn_wc_traversal_info_t;
>
> +/** Information about the externals definitions stored on a single
> + * versioned directory.
> + *
> + * @since New in 1.7.
> + */
> +typedef struct svn_wc_externals_definition_t svn_wc_externals_definition_t;
>
> /** Return a new, empty traversal info object, allocated in @a pool. */
> svn_wc_traversal_info_t *
> svn_wc_init_traversal_info(apr_pool_t *pool);
>
> +/** Return the value of the externals definition property recorded in
> + * @a ext_def.
> + *
> + * @since New in 1.7.
> + */
> +const char *
> +svn_wc_externals_definition_propval(svn_wc_externals_definition_t *ext_def);
> +
> +/** Return the base URL of the directory with which externals
> + * definition @a ext_def is/was associated. This is useful when
> + * determining how to interpret an externals definition that contains
> + * relative URLs.
> + *
> + * @since New in 1.7.
> + */
> +const char *
> +svn_wc_externals_definition_baseurl(svn_wc_externals_definition_t *ext_def);
>
> /** Set @a *externals_old and @a *externals_new to hash tables representing
> * changes to values of the svn:externals property on directories
> @@ -517,14 +540,25 @@ svn_wc_init_traversal_info(apr_pool_t *p
> * svn_wc_get_switch_editor(), etc.
> *
> * Each hash maps <tt>const char *</tt> directory names onto
> - * <tt>const char *</tt> values of the externals property for that directory.
> - * The dir names are full paths -- that is, anchor plus target, not target
> - * alone. The values are not parsed, they are simply copied raw, and are
> - * never NULL: directories that acquired or lost the property are
> - * simply omitted from the appropriate table. Directories whose value
> - * of the property did not change show the same value in each hash.
> + * <tt>svn_wc_externals_definition_t *</tt> objects describing the
> + * externals definitions for that directory. The directory names are
> + * full paths -- anchor plus target -- not target alone.
> *
> * The hashes, keys, and values have the same lifetime as @a traversal_info.
> + *
> + * @since New in 1.7.
> + */
> +void
> +svn_wc_edited_externals2(apr_hash_t **externals_old,
> + apr_hash_t **externals_new,
> + svn_wc_traversal_info_t *traversal_info);
> +
> +/** Like @a svn_wc_edited_externals2(), except that the returned
> + * hashes map <tt>const char *</tt> directory names onto <tt>const
> + * char *</tt> raw values of the externals property for that
> + * directory.
> + *
> + * @deprecated Provided for backward compatibility with the 1.6 API.
> */
SVN_DEPRECATED should be added.
> void
> svn_wc_edited_externals(apr_hash_t **externals_old,
--
Arfrever Frehtes Taifersar Arahesis
Received on 2009-04-09 00:43:26 CEST