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

Re: svn commit: r22443 - branches/multiple-moves/subversion/libsvn_client

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-11-27 19:38:40 CET

On Mon, 27 Nov 2006, hwright@tigris.org wrote:
...
> Rename copy_pair struct to svn_client__copy_pair.

The idiom used by the Subversion project is to use the "_t" suffix for
structures:

  svn_client__copy_pair_t

> * subversion/libsvn_client/client.h
> (copy_pair): Rename from this...
> (svn_client__copy_pair): ...to this.
>
> * subversion/libsvn_client/copy.c
> (wc_to_wc_copy, repos_to_repos_copy, setup_copy): Rename copy_pair to
> svn_client__copy_pair.
...
> --- branches/multiple-moves/subversion/libsvn_client/client.h (original)
> +++ branches/multiple-moves/subversion/libsvn_client/client.h Mon Nov 27 06:12:35 2006
> @@ -498,7 +498,7 @@
>
> /* The destination path relative to the repository root */
> const char *dst_rel;
> -} copy_pair;
> +} svn_client__copy_pair;
...
> --- branches/multiple-moves/subversion/libsvn_client/copy.c (original)
> +++ branches/multiple-moves/subversion/libsvn_client/copy.c Mon Nov 27 06:12:35 2006
> @@ -182,7 +182,8 @@
>
> for ( i = 0; i < copy_pairs->nelts; i++)
> {
> - copy_pair *pair = ((copy_pair **) (copy_pairs->elts))[i];
> + svn_client__copy_pair *pair =
> + ((svn_client__copy_pair **) (copy_pairs->elts))[i];
> svn_pool_clear(subpool);
> SVN_ERR(wc_to_wc_copy_single(pair->src, pair->dst, is_move, ctx,
> subpool));
> @@ -319,7 +320,8 @@
> sizeof(path_driver_info));
> for (i = 0; i < copy_pairs->nelts; i++)
> {
> - const char *src_url = ((copy_pair **) (copy_pairs->elts))[i]->src;
> + const char *src_url =
> + ((svn_client__copy_pair **) (copy_pairs->elts))[i]->src;
> path_driver_info *info = &(((path_driver_info *) (path_infos->elts))[i]);
>
> info->resurrection = FALSE;
> @@ -331,17 +333,20 @@
> checks on all paths, and so we can operate on all paths in the
> case of a move. We only need to look at the dirname of the first
> DST_URL because all the DST_URLs are in the same directory. */
> - top_url = apr_pstrdup(pool, ((copy_pair **) (copy_pairs->elts))[0]->dst);
> + top_url = apr_pstrdup(pool,
> + ((svn_client__copy_pair **) (copy_pairs->elts))[0]->dst);
> for (i = 0; i < copy_pairs->nelts; i++)
> {
> - const char *src_url = ((copy_pair **) (copy_pairs->elts))[i]->src;
> + const char *src_url =
> + ((svn_client__copy_pair **) (copy_pairs->elts))[i]->src;
> top_url = svn_path_get_longest_ancestor(top_url, src_url, pool);
> }
>
> /* Check each src/dst pair for resurrection. */
> for (i = 0; i < copy_pairs->nelts; i++)
> {
> - copy_pair *pair = ((copy_pair **) (copy_pairs->elts))[i];
> + svn_client__copy_pair *pair =
> + ((svn_client__copy_pair **) (copy_pairs->elts))[i];
> path_driver_info *info = &(((path_driver_info *) (path_infos->elts))[i]);
>
> if (strcmp(pair->src, pair->dst) == 0)
> @@ -388,9 +393,9 @@
> && ((top_url == NULL) || (top_url[0] == '\0')))
> {
> const char *first_src_url =
> - ((copy_pair **) (copy_pairs->elts))[0]->src;
> + ((svn_client__copy_pair **) (copy_pairs->elts))[0]->src;
> const char *first_dst_url =
> - ((copy_pair **) (copy_pairs->elts))[0]->dst;
> + ((svn_client__copy_pair **) (copy_pairs->elts))[0]->dst;
> return svn_error_createf
> (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
> _("Source and dest appear not to be in the same repository "
> @@ -410,7 +415,8 @@
> the DST_URL. */
> for (i = 0; i < copy_pairs->nelts; i++ )
> {
> - copy_pair *pair = ((copy_pair **) (copy_pairs->elts))[i];
> + svn_client__copy_pair *pair =
> + ((svn_client__copy_pair **) (copy_pairs->elts))[i];
> path_driver_info *info = &(((path_driver_info *) (path_infos->elts))[i]);
>
> if (strcmp(pair->dst, repos_root) != 0
> @@ -439,7 +445,8 @@
> TOP_URL, and URI-decode those sections. */
> for (i = 0; i < copy_pairs->nelts; i++)
> {
> - copy_pair *pair = ((copy_pair **) (copy_pairs->elts))[i];
> + svn_client__copy_pair *pair =
> + ((svn_client__copy_pair **) (copy_pairs->elts))[i];
> svn_node_kind_t dst_kind;
> const char *src_rel, *dst_rel;
> path_driver_info *info = &(((path_driver_info *) (path_infos->elts))[i]);
> @@ -1066,7 +1073,7 @@
> {
> const char *src_path = ((const char **) (src_paths->elts))[i];
> const char *src_basename;
> - copy_pair *pair = apr_palloc(pool, sizeof(*pair));
> + svn_client__copy_pair *pair = apr_palloc(pool, sizeof(*pair));
>
> svn_pool_clear(subpool);
> src_basename = svn_path_basename(src_path, subpool);
> @@ -1080,18 +1087,18 @@
>
> pair->src = src_path;
> pair->dst = svn_path_join(dst_path_in, src_basename, pool);
> - APR_ARRAY_PUSH(copy_pairs, copy_pair *) = pair;
> + APR_ARRAY_PUSH(copy_pairs, svn_client__copy_pair *) = pair;
> }
>
> svn_pool_destroy(subpool);
> }
> else
> {
> - copy_pair *pair = apr_palloc(pool, sizeof(*pair));
> + svn_client__copy_pair *pair = apr_palloc(pool, sizeof(*pair));
>
> pair->src = ((const char **) (src_paths->elts))[0];
> pair->dst = dst_path_in;
> - APR_ARRAY_PUSH(copy_pairs, copy_pair *) = pair;
> + APR_ARRAY_PUSH(copy_pairs, svn_client__copy_pair *) = pair;
> }
>
> if (!srcs_are_urls && !dst_is_url)
> @@ -1100,8 +1107,10 @@
>
> for ( i = 0; i < copy_pairs->nelts; i++ )
> {
> - const char *src_path = ((copy_pair **) (copy_pairs->elts))[i]->src;
> - const char *dst_path = ((copy_pair **) (copy_pairs->elts))[i]->dst;
> + const char *src_path =
> + ((svn_client__copy_pair **) (copy_pairs->elts))[i]->src;
> + const char *dst_path =
> + ((svn_client__copy_pair **) (copy_pairs->elts))[i]->dst;
>
> svn_pool_clear(subpool);
>
> @@ -1123,9 +1132,9 @@
> for ( i = 0; i < copy_pairs->nelts; i++)
> {
> const char *src_path =
> - ((copy_pair **) (copy_pairs->elts))[i]->src;
> + ((svn_client__copy_pair **) (copy_pairs->elts))[i]->src;
> const char *dst_path =
> - ((copy_pair **) (copy_pairs->elts))[i]->dst;
> + ((svn_client__copy_pair **) (copy_pairs->elts))[i]->dst;
>
> if (strcmp(src_path, dst_path) == 0)
> return svn_error_createf
> @@ -1153,7 +1162,7 @@
> for ( i = 0; i < copy_pairs->nelts; i++)
> {
> const char *src_path =
> - ((copy_pair **) (copy_pairs->elts))[i]->src;
> + ((svn_client__copy_pair **) (copy_pairs->elts))[i]->src;
>
> /* We can convert the working copy path to a URL based on the
> entries file. */
> @@ -1180,15 +1189,16 @@
> _("'%s' does not seem to have a URL associated with it"),
> svn_path_local_style(src_path, pool));
>
> - ((copy_pair **) (copy_pairs->elts))[i]->src = entry->url;
> + ((svn_client__copy_pair **) (copy_pairs->elts))[i]->src =
> + entry->url;
> srcs_are_urls = TRUE;
> }
> }
> }
> }
>
> - src = ((copy_pair **) (copy_pairs->elts))[0]->src;
> - dst = ((copy_pair **) (copy_pairs->elts))[0]->dst;
> + src = ((svn_client__copy_pair **) (copy_pairs->elts))[0]->src;
> + dst = ((svn_client__copy_pair **) (copy_pairs->elts))[0]->dst;
>
> /* Now, call the right handler for the operation. */
> if ((! srcs_are_urls) && (! dst_is_url))

  • application/pgp-signature attachment: stored
Received on Tue Nov 28 05:24:47 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.