client.h (251886) | client.h (253734) |
---|---|
1/* 2 * client.h : shared stuff internal to the client library. 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 --- 6 unchanged lines hidden (view full) --- 15 * Unless required by applicable law or agreed to in writing, 16 * software distributed under the License is distributed on an 17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 18 * KIND, either express or implied. See the License for the 19 * specific language governing permissions and limitations 20 * under the License. 21 * ==================================================================== 22 */ | 1/* 2 * client.h : shared stuff internal to the client library. 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 --- 6 unchanged lines hidden (view full) --- 15 * Unless required by applicable law or agreed to in writing, 16 * software distributed under the License is distributed on an 17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 18 * KIND, either express or implied. See the License for the 19 * specific language governing permissions and limitations 20 * under the License. 21 * ==================================================================== 22 */ |
23 | |
24 | 23 |
24 25 |
|
25#ifndef SVN_LIBSVN_CLIENT_H 26#define SVN_LIBSVN_CLIENT_H 27 28 29#include <apr_pools.h> 30 31#include "svn_types.h" 32#include "svn_opt.h" --- 170 unchanged lines hidden (view full) --- 203 they don't have the same repository root URL), set *ANCESTOR_P to NULL. 204 205 If SESSION is not NULL, use it for retrieving the common ancestor instead 206 of creating a new session. 207 208 Use the authentication baton cached in CTX to authenticate against 209 the repository. Use POOL for all allocations. 210 | 26#ifndef SVN_LIBSVN_CLIENT_H 27#define SVN_LIBSVN_CLIENT_H 28 29 30#include <apr_pools.h> 31 32#include "svn_types.h" 33#include "svn_opt.h" --- 170 unchanged lines hidden (view full) --- 204 they don't have the same repository root URL), set *ANCESTOR_P to NULL. 205 206 If SESSION is not NULL, use it for retrieving the common ancestor instead 207 of creating a new session. 208 209 Use the authentication baton cached in CTX to authenticate against 210 the repository. Use POOL for all allocations. 211 |
212 See also svn_client__calc_youngest_common_ancestor() to find youngest 213 common ancestor for already fetched history-as-mergeinfo information. 214 |
|
211 See also svn_client__youngest_common_ancestor(). 212*/ 213svn_error_t * 214svn_client__get_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p, 215 const svn_client__pathrev_t *loc1, 216 const svn_client__pathrev_t *loc2, 217 svn_ra_session_t *session, 218 svn_client_ctx_t *ctx, 219 apr_pool_t *result_pool, 220 apr_pool_t *scratch_pool); 221 | 215 See also svn_client__youngest_common_ancestor(). 216*/ 217svn_error_t * 218svn_client__get_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p, 219 const svn_client__pathrev_t *loc1, 220 const svn_client__pathrev_t *loc2, 221 svn_ra_session_t *session, 222 svn_client_ctx_t *ctx, 223 apr_pool_t *result_pool, 224 apr_pool_t *scratch_pool); 225 |
226/* Find the common ancestor of two locations in a repository using already 227 fetched history-as-mergeinfo information. 228 229 Ancestry is determined by the 'copy-from' relationship and the normal 230 successor relationship. 231 232 Set *ANCESTOR_P to the location of the youngest common ancestor of 233 LOC1 and LOC2. If the locations have no common ancestor (including if 234 they don't have the same repository root URL), set *ANCESTOR_P to NULL. 235 236 HISTORY1, HAS_REV_ZERO_HISTORY1, HISTORY2, HAS_REV_ZERO_HISTORY2 are 237 history-as-mergeinfo information as returned by 238 svn_client__get_history_as_mergeinfo() for LOC1 and LOC2 respectively. 239 240 See also svn_client__get_youngest_common_ancestor(). 241 242*/ 243svn_error_t * 244svn_client__calc_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p, 245 const svn_client__pathrev_t *loc1, 246 apr_hash_t *history1, 247 svn_boolean_t has_rev_zero_history1, 248 const svn_client__pathrev_t *loc2, 249 apr_hash_t *history2, 250 svn_boolean_t has_rev_zero_history2, 251 apr_pool_t *result_pool, 252 apr_pool_t *scratch_pool); 253 |
|
222/* Ensure that RA_SESSION's session URL matches SESSION_URL, 223 reparenting that session if necessary. 224 Store the previous session URL in *OLD_SESSION_URL (so that if the 225 reparenting is meant to be temporary, the caller can reparent the 226 session back to where it was). 227 228 If SESSION_URL is NULL, treat this as a magic value meaning "point 229 the RA session to the root of the repository". --- 12 unchanged lines hidden (view full) --- 242*/ 243svn_error_t * 244svn_client__ensure_ra_session_url(const char **old_session_url, 245 svn_ra_session_t *ra_session, 246 const char *session_url, 247 apr_pool_t *pool); 248 249/* ---------------------------------------------------------------- */ | 254/* Ensure that RA_SESSION's session URL matches SESSION_URL, 255 reparenting that session if necessary. 256 Store the previous session URL in *OLD_SESSION_URL (so that if the 257 reparenting is meant to be temporary, the caller can reparent the 258 session back to where it was). 259 260 If SESSION_URL is NULL, treat this as a magic value meaning "point 261 the RA session to the root of the repository". --- 12 unchanged lines hidden (view full) --- 274*/ 275svn_error_t * 276svn_client__ensure_ra_session_url(const char **old_session_url, 277 svn_ra_session_t *ra_session, 278 const char *session_url, 279 apr_pool_t *pool); 280 281/* ---------------------------------------------------------------- */ |
250 | 282 283 |
251/*** RA callbacks ***/ 252 253 254/* CTX is of type "svn_client_ctx_t *". */ 255#define SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx) \ 256 ((ctx)->log_msg_func3 || (ctx)->log_msg_func2 || (ctx)->log_msg_func) 257 258/* Open an RA session, returning it in *RA_SESSION or a corrected URL --- 65 unchanged lines hidden (view full) --- 324 325 326void * 327svn_client__ra_make_cb_baton(svn_wc_context_t *wc_ctx, 328 apr_hash_t *relpath_map, 329 apr_pool_t *result_pool); 330 331/* ---------------------------------------------------------------- */ | 284/*** RA callbacks ***/ 285 286 287/* CTX is of type "svn_client_ctx_t *". */ 288#define SVN_CLIENT__HAS_LOG_MSG_FUNC(ctx) \ 289 ((ctx)->log_msg_func3 || (ctx)->log_msg_func2 || (ctx)->log_msg_func) 290 291/* Open an RA session, returning it in *RA_SESSION or a corrected URL --- 65 unchanged lines hidden (view full) --- 357 358 359void * 360svn_client__ra_make_cb_baton(svn_wc_context_t *wc_ctx, 361 apr_hash_t *relpath_map, 362 apr_pool_t *result_pool); 363 364/* ---------------------------------------------------------------- */ |
332 | 365 366 |
333/*** Add/delete ***/ 334 335/* If AUTOPROPS is not null: Then read automatic properties matching PATH 336 from AUTOPROPS. AUTOPROPS is is a hash as per 337 svn_client__get_all_auto_props. Set *PROPERTIES to a hash containing 338 propname/value pairs (const char * keys mapping to svn_string_t * values). 339 340 If AUTOPROPS is null then set *PROPERTIES to an empty hash. --- 96 unchanged lines hidden (view full) --- 437 intermediate parent directories if MAKE_PARENTS is TRUE. */ 438svn_error_t * 439svn_client__make_local_parents(const char *path, 440 svn_boolean_t make_parents, 441 svn_client_ctx_t *ctx, 442 apr_pool_t *pool); 443 444/* ---------------------------------------------------------------- */ | 367/*** Add/delete ***/ 368 369/* If AUTOPROPS is not null: Then read automatic properties matching PATH 370 from AUTOPROPS. AUTOPROPS is is a hash as per 371 svn_client__get_all_auto_props. Set *PROPERTIES to a hash containing 372 propname/value pairs (const char * keys mapping to svn_string_t * values). 373 374 If AUTOPROPS is null then set *PROPERTIES to an empty hash. --- 96 unchanged lines hidden (view full) --- 471 intermediate parent directories if MAKE_PARENTS is TRUE. */ 472svn_error_t * 473svn_client__make_local_parents(const char *path, 474 svn_boolean_t make_parents, 475 svn_client_ctx_t *ctx, 476 apr_pool_t *pool); 477 478/* ---------------------------------------------------------------- */ |
445 | 479 480 |
446/*** Checkout, update and switch ***/ 447 448/* Update a working copy LOCAL_ABSPATH to REVISION, and (if not NULL) set 449 RESULT_REV to the update revision. 450 451 If DEPTH is svn_depth_unknown, then use whatever depth is already 452 set for LOCAL_ABSPATH, or @c svn_depth_infinity if LOCAL_ABSPATH does 453 not exist. --- 122 unchanged lines hidden (view full) --- 576 svn_boolean_t ignore_externals, 577 svn_boolean_t allow_unver_obstructions, 578 svn_boolean_t ignore_ancestry, 579 svn_boolean_t *timestamp_sleep, 580 svn_client_ctx_t *ctx, 581 apr_pool_t *pool); 582 583/* ---------------------------------------------------------------- */ | 481/*** Checkout, update and switch ***/ 482 483/* Update a working copy LOCAL_ABSPATH to REVISION, and (if not NULL) set 484 RESULT_REV to the update revision. 485 486 If DEPTH is svn_depth_unknown, then use whatever depth is already 487 set for LOCAL_ABSPATH, or @c svn_depth_infinity if LOCAL_ABSPATH does 488 not exist. --- 122 unchanged lines hidden (view full) --- 611 svn_boolean_t ignore_externals, 612 svn_boolean_t allow_unver_obstructions, 613 svn_boolean_t ignore_ancestry, 614 svn_boolean_t *timestamp_sleep, 615 svn_client_ctx_t *ctx, 616 apr_pool_t *pool); 617 618/* ---------------------------------------------------------------- */ |
584 | 619 620 |
585/*** Inheritable Properties ***/ 586 587/* Convert any svn_prop_inherited_item_t elements in INHERITED_PROPS which 588 have repository root relative path PATH_OR_URL structure members to URLs 589 using REPOS_ROOT_URL. Changes to the contents of INHERITED_PROPS are 590 allocated in RESULT_POOL. SCRATCH_POOL is used for temporary 591 allocations. */ 592svn_error_t * --- 28 unchanged lines hidden (view full) --- 621 svn_revnum_t revision, 622 svn_depth_t depth, 623 svn_ra_session_t *ra_session, 624 svn_client_ctx_t *ctx, 625 apr_pool_t *result_pool, 626 apr_pool_t *scratch_pool); 627 628/* ---------------------------------------------------------------- */ | 621/*** Inheritable Properties ***/ 622 623/* Convert any svn_prop_inherited_item_t elements in INHERITED_PROPS which 624 have repository root relative path PATH_OR_URL structure members to URLs 625 using REPOS_ROOT_URL. Changes to the contents of INHERITED_PROPS are 626 allocated in RESULT_POOL. SCRATCH_POOL is used for temporary 627 allocations. */ 628svn_error_t * --- 28 unchanged lines hidden (view full) --- 657 svn_revnum_t revision, 658 svn_depth_t depth, 659 svn_ra_session_t *ra_session, 660 svn_client_ctx_t *ctx, 661 apr_pool_t *result_pool, 662 apr_pool_t *scratch_pool); 663 664/* ---------------------------------------------------------------- */ |
629 | 665 666 |
630/*** Editor for repository diff ***/ 631 632/* Create an editor for a pure repository comparison, i.e. comparing one 633 repository version against the other. 634 635 DIFF_CALLBACKS/DIFF_CMD_BATON represent the callback that implements 636 the comparison. 637 --- 23 unchanged lines hidden (view full) --- 661 svn_revnum_t revision, 662 svn_boolean_t text_deltas, 663 const svn_diff_tree_processor_t *processor, 664 svn_cancel_func_t cancel_func, 665 void *cancel_baton, 666 apr_pool_t *result_pool); 667 668/* ---------------------------------------------------------------- */ | 667/*** Editor for repository diff ***/ 668 669/* Create an editor for a pure repository comparison, i.e. comparing one 670 repository version against the other. 671 672 DIFF_CALLBACKS/DIFF_CMD_BATON represent the callback that implements 673 the comparison. 674 --- 23 unchanged lines hidden (view full) --- 698 svn_revnum_t revision, 699 svn_boolean_t text_deltas, 700 const svn_diff_tree_processor_t *processor, 701 svn_cancel_func_t cancel_func, 702 void *cancel_baton, 703 apr_pool_t *result_pool); 704 705/* ---------------------------------------------------------------- */ |
669 | 706 707 |
670/*** Editor for diff summary ***/ 671 672/* Set *CALLBACKS and *CALLBACK_BATON to a set of diff callbacks that will 673 report a diff summary, i.e. only providing information about the changed 674 items without the text deltas. 675 676 TARGET is the target path, relative to the anchor, of the diff. 677 --- 6 unchanged lines hidden (view full) --- 684 void **callback_baton, 685 const char *target, 686 svn_boolean_t reversed, 687 svn_client_diff_summarize_func_t summarize_func, 688 void *summarize_baton, 689 apr_pool_t *pool); 690 691/* ---------------------------------------------------------------- */ | 708/*** Editor for diff summary ***/ 709 710/* Set *CALLBACKS and *CALLBACK_BATON to a set of diff callbacks that will 711 report a diff summary, i.e. only providing information about the changed 712 items without the text deltas. 713 714 TARGET is the target path, relative to the anchor, of the diff. 715 --- 6 unchanged lines hidden (view full) --- 722 void **callback_baton, 723 const char *target, 724 svn_boolean_t reversed, 725 svn_client_diff_summarize_func_t summarize_func, 726 void *summarize_baton, 727 apr_pool_t *pool); 728 729/* ---------------------------------------------------------------- */ |
692 | 730 731 |
693/*** Copy Stuff ***/ 694 695/* This structure is used to associate a specific copy or move SRC with a 696 specific copy or move destination. It also contains information which 697 various helper functions may need. Not every copy function uses every 698 field. 699*/ 700typedef struct svn_client__copy_pair_t --- 24 unchanged lines hidden (view full) --- 725 /* The absolute destination path or url */ 726 const char *dst_abspath_or_url; 727 728 /* The absolute source path or url of the destination's parent. */ 729 const char *dst_parent_abspath; 730} svn_client__copy_pair_t; 731 732/* ---------------------------------------------------------------- */ | 732/*** Copy Stuff ***/ 733 734/* This structure is used to associate a specific copy or move SRC with a 735 specific copy or move destination. It also contains information which 736 various helper functions may need. Not every copy function uses every 737 field. 738*/ 739typedef struct svn_client__copy_pair_t --- 24 unchanged lines hidden (view full) --- 764 /* The absolute destination path or url */ 765 const char *dst_abspath_or_url; 766 767 /* The absolute source path or url of the destination's parent. */ 768 const char *dst_parent_abspath; 769} svn_client__copy_pair_t; 770 771/* ---------------------------------------------------------------- */ |
733 | 772 773 |
734/*** Commit Stuff ***/ 735 736/* WARNING: This is all new, untested, un-peer-reviewed conceptual 737 stuff. 738 739 The day that 'svn switch' came into existence, our old commit 740 crawler (svn_wc_crawl_local_mods) became obsolete. It relied far 741 too heavily on the on-disk hierarchy of files and directories, and --- 197 unchanged lines hidden (view full) --- 939 void *edit_baton, 940 const char *notify_path_prefix, 941 apr_hash_t **sha1_checksums, 942 svn_client_ctx_t *ctx, 943 apr_pool_t *result_pool, 944 apr_pool_t *scratch_pool); 945 946 | 774/*** Commit Stuff ***/ 775 776/* WARNING: This is all new, untested, un-peer-reviewed conceptual 777 stuff. 778 779 The day that 'svn switch' came into existence, our old commit 780 crawler (svn_wc_crawl_local_mods) became obsolete. It relied far 781 too heavily on the on-disk hierarchy of files and directories, and --- 197 unchanged lines hidden (view full) --- 979 void *edit_baton, 980 const char *notify_path_prefix, 981 apr_hash_t **sha1_checksums, 982 svn_client_ctx_t *ctx, 983 apr_pool_t *result_pool, 984 apr_pool_t *scratch_pool); 985 986 |
947 | 987 988 |
948/*** Externals (Modules) ***/ 949 950/* Handle changes to the svn:externals property described by EXTERNALS_NEW, 951 and AMBIENT_DEPTHS. The tree's top level directory 952 is at TARGET_ABSPATH which has a root URL of REPOS_ROOT_URL. 953 A write lock should be held. 954 955 For each changed value of the property, discover the nature of the --- 155 unchanged lines hidden (view full) --- 1111 * at the end of this operation, else set it to false. 1112 */ 1113svn_error_t * 1114svn_client__resolve_conflicts(svn_boolean_t *conflicts_remain, 1115 apr_hash_t *conflicted_paths, 1116 svn_client_ctx_t *ctx, 1117 apr_pool_t *scratch_pool); 1118 | 989/*** Externals (Modules) ***/ 990 991/* Handle changes to the svn:externals property described by EXTERNALS_NEW, 992 and AMBIENT_DEPTHS. The tree's top level directory 993 is at TARGET_ABSPATH which has a root URL of REPOS_ROOT_URL. 994 A write lock should be held. 995 996 For each changed value of the property, discover the nature of the --- 155 unchanged lines hidden (view full) --- 1152 * at the end of this operation, else set it to false. 1153 */ 1154svn_error_t * 1155svn_client__resolve_conflicts(svn_boolean_t *conflicts_remain, 1156 apr_hash_t *conflicted_paths, 1157 svn_client_ctx_t *ctx, 1158 apr_pool_t *scratch_pool); 1159 |
1119 | 1160 1161 |
1120#ifdef __cplusplus 1121} 1122#endif /* __cplusplus */ 1123 1124#endif /* SVN_LIBSVN_CLIENT_H */ | 1162#ifdef __cplusplus 1163} 1164#endif /* __cplusplus */ 1165 1166#endif /* SVN_LIBSVN_CLIENT_H */ |