client.c (289180) | client.c (298845) |
---|---|
1/* 2 * client.c : Functions for repository access via the Subversion protocol 3 * 4 * ==================================================================== 5 * Licensed to the Apache Software Foundation (ASF) under one 6 * or more contributor license agreements. See the NOTICE file 7 * distributed with this work for additional information 8 * regarding copyright ownership. The ASF licenses this file --- 1177 unchanged lines hidden (view full) --- 1186parse_iproplist(apr_array_header_t **inherited_props, 1187 const apr_array_header_t *iproplist, 1188 svn_ra_session_t *session, 1189 apr_pool_t *result_pool, 1190 apr_pool_t *scratch_pool) 1191 1192{ 1193 int i; | 1/* 2 * client.c : Functions for repository access via the Subversion protocol 3 * 4 * ==================================================================== 5 * Licensed to the Apache Software Foundation (ASF) under one 6 * or more contributor license agreements. See the NOTICE file 7 * distributed with this work for additional information 8 * regarding copyright ownership. The ASF licenses this file --- 1177 unchanged lines hidden (view full) --- 1186parse_iproplist(apr_array_header_t **inherited_props, 1187 const apr_array_header_t *iproplist, 1188 svn_ra_session_t *session, 1189 apr_pool_t *result_pool, 1190 apr_pool_t *scratch_pool) 1191 1192{ 1193 int i; |
1194 const char *repos_root_url; | |
1195 apr_pool_t *iterpool; 1196 1197 if (iproplist == NULL) 1198 { 1199 /* If the server doesn't have the SVN_RA_CAPABILITY_INHERITED_PROPS 1200 capability we shouldn't be asking for inherited props, but if we 1201 did and the server sent back nothing then we'll want to handle 1202 that. */ 1203 *inherited_props = NULL; 1204 return SVN_NO_ERROR; 1205 } 1206 | 1194 apr_pool_t *iterpool; 1195 1196 if (iproplist == NULL) 1197 { 1198 /* If the server doesn't have the SVN_RA_CAPABILITY_INHERITED_PROPS 1199 capability we shouldn't be asking for inherited props, but if we 1200 did and the server sent back nothing then we'll want to handle 1201 that. */ 1202 *inherited_props = NULL; 1203 return SVN_NO_ERROR; 1204 } 1205 |
1207 SVN_ERR(ra_svn_get_repos_root(session, &repos_root_url, scratch_pool)); 1208 | |
1209 *inherited_props = apr_array_make( 1210 result_pool, iproplist->nelts, sizeof(svn_prop_inherited_item_t *)); 1211 1212 iterpool = svn_pool_create(scratch_pool); 1213 1214 for (i = 0; i < iproplist->nelts; i++) 1215 { 1216 apr_array_header_t *iprop_list; --- 9 unchanged lines hidden (view full) --- 1226 SVN_ERR_RA_SVN_MALFORMED_DATA, NULL, 1227 _("Inherited proplist element not a list")); 1228 1229 svn_pool_clear(iterpool); 1230 1231 SVN_ERR(svn_ra_svn__parse_tuple(elt->u.list, iterpool, "cl", 1232 &parent_rel_path, &iprop_list)); 1233 SVN_ERR(svn_ra_svn__parse_proplist(iprop_list, iterpool, &iprops)); | 1206 *inherited_props = apr_array_make( 1207 result_pool, iproplist->nelts, sizeof(svn_prop_inherited_item_t *)); 1208 1209 iterpool = svn_pool_create(scratch_pool); 1210 1211 for (i = 0; i < iproplist->nelts; i++) 1212 { 1213 apr_array_header_t *iprop_list; --- 9 unchanged lines hidden (view full) --- 1223 SVN_ERR_RA_SVN_MALFORMED_DATA, NULL, 1224 _("Inherited proplist element not a list")); 1225 1226 svn_pool_clear(iterpool); 1227 1228 SVN_ERR(svn_ra_svn__parse_tuple(elt->u.list, iterpool, "cl", 1229 &parent_rel_path, &iprop_list)); 1230 SVN_ERR(svn_ra_svn__parse_proplist(iprop_list, iterpool, &iprops)); |
1234 new_iprop->path_or_url = svn_path_url_add_component2(repos_root_url, 1235 parent_rel_path, 1236 result_pool); | 1231 new_iprop->path_or_url = apr_pstrdup(result_pool, parent_rel_path); |
1237 new_iprop->prop_hash = svn_hash__make(result_pool); 1238 for (hi = apr_hash_first(iterpool, iprops); 1239 hi; 1240 hi = apr_hash_next(hi)) 1241 { 1242 const char *name = apr_hash_this_key(hi); 1243 svn_string_t *value = apr_hash_this_val(hi); 1244 svn_hash_sets(new_iprop->prop_hash, --- 1701 unchanged lines hidden --- | 1232 new_iprop->prop_hash = svn_hash__make(result_pool); 1233 for (hi = apr_hash_first(iterpool, iprops); 1234 hi; 1235 hi = apr_hash_next(hi)) 1236 { 1237 const char *name = apr_hash_this_key(hi); 1238 svn_string_t *value = apr_hash_this_val(hi); 1239 svn_hash_sets(new_iprop->prop_hash, --- 1701 unchanged lines hidden --- |