You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/03/12 19:45:36 UTC
svn commit: r922387 - /subversion/trunk/subversion/libsvn_client/cleanup.c
Author: dannas
Date: Fri Mar 12 18:45:35 2010
New Revision: 922387
URL: http://svn.apache.org/viewvc?rev=922387&view=rev
Log:
Follow up to r920118.
* subversion/libsvn_client/cleanup.c
(svn_client_upgrade): Use svn__apr_hash_index_{key,val} to avoid
casts. Use a more descriptive variable name for the path holding the
svn:externals declaration.
Suggested by: philipm
julianfoad
Approved by: philipm
Modified:
subversion/trunk/subversion/libsvn_client/cleanup.c
Modified: subversion/trunk/subversion/libsvn_client/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/cleanup.c?rev=922387&r1=922386&r2=922387&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/cleanup.c (original)
+++ subversion/trunk/subversion/libsvn_client/cleanup.c Fri Mar 12 18:45:35 2010
@@ -34,7 +34,6 @@
#include "svn_dirent_uri.h"
#include "svn_pools.h"
#include "client.h"
-#include "svn_pools.h"
#include "svn_props.h"
#include "svn_private_config.h"
@@ -143,20 +142,15 @@ svn_client_upgrade(const char *path,
for (hi = apr_hash_first(scratch_pool, externals); hi;
hi = apr_hash_next(hi))
{
- const char *key;
int i;
- apr_ssize_t klen;
- svn_string_t *external_desc;
+ const char *externals_parent = svn__apr_hash_index_key(hi);
+ svn_string_t *external_desc = svn__apr_hash_index_val(hi);
apr_array_header_t *externals_p;
svn_pool_clear(iterpool);
externals_p = apr_array_make(iterpool, 1,
sizeof(svn_wc_external_item2_t*));
- apr_hash_this(hi, (void*)&key, &klen, NULL);
-
- external_desc = apr_hash_get(externals, key, klen);
-
SVN_ERR(svn_wc_parse_externals_description3(&externals_p,
svn_dirent_dirname(path,
iterpool),
@@ -172,8 +166,8 @@ svn_client_upgrade(const char *path,
item = APR_ARRAY_IDX(externals_p, i, svn_wc_external_item2_t*);
- /* The key is the path to the dir the svn:externals was set on */
- external_path = svn_dirent_join(key, item->target_dir, iterpool);
+ external_path = svn_dirent_join(externals_parent, item->target_dir,
+ iterpool);
SVN_ERR(svn_dirent_get_absolute(&external_abspath, external_path,
iterpool));